From edb9019910c2ae31c2e9ec03717daf933adcf7ca Mon Sep 17 00:00:00 2001 From: monojenkins Date: Wed, 14 Oct 2020 02:55:45 -0400 Subject: [PATCH] Add mprof-report.exe into msvc build. (#43220) Co-authored-by: lateralusX --- src/mono/mono/profiler/Makefile.am | 18 ++++ src/mono/mono/profiler/mprof-report.c | 2 + src/mono/msvc/Makefile.am | 6 ++ src/mono/msvc/mono.sln | 16 ++- src/mono/msvc/mprof-report.vcxproj | 163 +++++++++++++++++++++++++++++ src/mono/msvc/mprof-report.vcxproj.filters | 19 ++++ 6 files changed, 222 insertions(+), 2 deletions(-) create mode 100644 src/mono/msvc/mprof-report.vcxproj create mode 100644 src/mono/msvc/mprof-report.vcxproj.filters diff --git a/src/mono/mono/profiler/Makefile.am b/src/mono/mono/profiler/Makefile.am index 5380a40..0e91101 100644 --- a/src/mono/mono/profiler/Makefile.am +++ b/src/mono/mono/profiler/Makefile.am @@ -1,5 +1,7 @@ MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules +if !ENABLE_MSVC_ONLY + AM_CPPFLAGS = \ -DSUPPRESSION_DIR=\""$(datadir)/mono-$(API_VER)/mono/profiler"\" \ -I$(top_srcdir) \ @@ -207,3 +209,19 @@ EXTRA_DIST = \ $(PLOG_TESTS_SRC) \ ptestrunner.pl \ $(suppression_DATA) + +endif # !ENABLE_MSVC_ONLY + +if ENABLE_MSVC_ONLY + +all-local: + + $(MAKE) -C $(top_srcdir)/msvc mprof-report + cp -f $(mono_msvc_build_bin_dir)/mprof-report$(EXEEXT) ./mprof-report$(EXEEXT) + +clean-local: + + $(MAKE) -C $(top_srcdir)/msvc clean-mprof-report + rm ./mprof-report$(EXEEXT) + +endif # ENABLE_MSVC_ONLY diff --git a/src/mono/mono/profiler/mprof-report.c b/src/mono/mono/profiler/mprof-report.c index ed027f5..9fc9570 100644 --- a/src/mono/mono/profiler/mprof-report.c +++ b/src/mono/mono/profiler/mprof-report.c @@ -18,7 +18,9 @@ #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) #include #endif +#ifndef HOST_WIN32 #include +#endif #include #if defined (HAVE_SYS_ZLIB) #include diff --git a/src/mono/msvc/Makefile.am b/src/mono/msvc/Makefile.am index a708210..f70f2a9 100644 --- a/src/mono/msvc/Makefile.am +++ b/src/mono/msvc/Makefile.am @@ -92,6 +92,12 @@ genmdesc: clean-genmdesc: $(top_srcdir)/msvc/run-msbuild.sh "clean" "$(host_cpu)" "release" "sgen" "" "genmdesc.vcxproj" +mprof-report: + $(top_srcdir)/msvc/run-msbuild.sh "build" "$(host_cpu)" "release" "sgen" "" "mprof-report.vcxproj" + +clean-mprof-report: + $(top_srcdir)/msvc/run-msbuild.sh "clean" "$(host_cpu)" "release" "sgen" "" "mprof-report.vcxproj" + jay: $(top_srcdir)/msvc/run-msbuild.sh "build" "$(host_cpu)" "release" "sgen" "" "$(top_srcdir)/mcs/jay/jay.vcxproj" diff --git a/src/mono/msvc/mono.sln b/src/mono/msvc/mono.sln index c566c0e..14e1b13 100644 --- a/src/mono/msvc/mono.sln +++ b/src/mono/msvc/mono.sln @@ -216,6 +216,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monow", "monow.vcxproj", "{ {92AE7622-5F58-4234-9A26-9EC71876B3F4} = {92AE7622-5F58-4234-9A26-9EC71876B3F4} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mprof-report", "mprof-report.vcxproj", "{32AC21A3-DDCD-417B-9637-9807752491F0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -456,6 +458,14 @@ Global {D89D58F1-DA7A-4157-AFEE-F43D3BA20C9D}.Release|Win32.Build.0 = Release|Win32 {D89D58F1-DA7A-4157-AFEE-F43D3BA20C9D}.Release|x64.ActiveCfg = Release|x64 {D89D58F1-DA7A-4157-AFEE-F43D3BA20C9D}.Release|x64.Build.0 = Release|x64 + {32AC21A3-DDCD-417B-9637-9807752491F0}.Debug|Win32.ActiveCfg = Debug|Win32 + {32AC21A3-DDCD-417B-9637-9807752491F0}.Debug|Win32.Build.0 = Debug|Win32 + {32AC21A3-DDCD-417B-9637-9807752491F0}.Debug|x64.ActiveCfg = Debug|x64 + {32AC21A3-DDCD-417B-9637-9807752491F0}.Debug|x64.Build.0 = Debug|x64 + {32AC21A3-DDCD-417B-9637-9807752491F0}.Release|Win32.ActiveCfg = Release|Win32 + {32AC21A3-DDCD-417B-9637-9807752491F0}.Release|Win32.Build.0 = Release|Win32 + {32AC21A3-DDCD-417B-9637-9807752491F0}.Release|x64.ActiveCfg = Release|x64 + {32AC21A3-DDCD-417B-9637-9807752491F0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -497,11 +507,13 @@ Global {C3D4C623-55F8-4653-980D-61AA629B4E1D} = {7AF3635B-001C-42BF-94B9-C036CFDCA71D} {8C02A728-7A50-43CE-B507-BDFC05B7EA94} = {4CFD7702-60B2-4E82-BFAD-FCBB53EB4DA2} {D89D58F1-DA7A-4157-AFEE-F43D3BA20C9D} = {DE3617B4-17A8-4E5F-A00F-BA43D956881F} + {32AC21A3-DDCD-417B-9637-9807752491F0} = {EE2CC761-9652-44AC-9204-7EB31194CAA6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - AMDCaPersistentConfig = Debug|Win32 - AMDCaPersistentStartup = mono AMDCaProjectFile = C:\Users\Owner\Development\monogit\mono\msvc\CodeAnalyst\mono.caw + AMDCaPersistentStartup = mono + AMDCaPersistentConfig = Debug|Win32 + SolutionGuid = {24E08570-1FAE-4030-8A4F-B124544AF6EA} EndGlobalSection GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} diff --git a/src/mono/msvc/mprof-report.vcxproj b/src/mono/msvc/mprof-report.vcxproj new file mode 100644 index 0000000..90cfc58 --- /dev/null +++ b/src/mono/msvc/mprof-report.vcxproj @@ -0,0 +1,163 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {32AC21A3-DDCD-417B-9637-9807752491F0} + mprof_report + Win32Proj + + + + Application + false + $(DefaultPlatformToolset) + Unicode + + + Application + true + $(DefaultPlatformToolset) + Unicode + + + Application + false + $(DefaultPlatformToolset) + Unicode + + + Application + true + $(DefaultPlatformToolset) + Unicode + + + + + + + + + + + + + + + + + + + + + + + false + $(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\ + $(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\ + + + false + $(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\ + $(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\ + + + true + $(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\ + $(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\ + + + true + $(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\ + $(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\ + + + + Disabled + $(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories) + WIN32;WIN32_LEAN_AND_MEAN;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + %(DisableSpecificWarnings) + Level3 + + + eglib.lib;%(AdditionalDependencies) + Console + + + + + Disabled + $(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories) + WIN32;WIN32_LEAN_AND_MEAN;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + %(DisableSpecificWarnings) + Level3 + + + eglib.lib;%(AdditionalDependencies) + Console + + + + + $(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories) + WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + Level3 + true + true + true + + + eglib.lib;%(AdditionalDependencies) + Console + UseLinkTimeCodeGeneration + + + + + $(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories) + WIN32;WIN32_LEAN_AND_MEAN;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + Level3 + true + true + true + + + eglib.lib;%(AdditionalDependencies) + Console + UseLinkTimeCodeGeneration + + + + + CompileAsCpp + + + + + + + + {158073ed-99ae-4196-9edc-ddb2344f8466} + + + + + + diff --git a/src/mono/msvc/mprof-report.vcxproj.filters b/src/mono/msvc/mprof-report.vcxproj.filters new file mode 100644 index 0000000..1e5075f --- /dev/null +++ b/src/mono/msvc/mprof-report.vcxproj.filters @@ -0,0 +1,19 @@ + + + + + {1A73FC85-1ECA-42AB-98B0-A51CDF4EAD8E} + + + {1043B155-A292-428E-ADF8-C5D9C1F18AD5} + + + {10CC9805-83F9-4B48-99B3-D966430E9FEE} + + + + + Source Files + + + -- 2.7.4