diff options
author | Zoltan Varga <vargaz@gmail.com> | 2017-01-10 01:37:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-10 01:37:57 +0300 |
commit | 2ba6bcbc48f8b4e145f9ad450fef8d411b728a8e (patch) | |
tree | 6492f5adecb290d1fc9c76c4304f8a9fb96c2aac /mcs/class/aot-compiler | |
parent | 0007e99a87229eab592c179430c4fe3d885e1363 (diff) |
[aot] Rewrite the AOT profiler. (#4176)
* [aot] Rewrite the AOT profiler.
The AOT profiler is used to collect the methods/instances used at runtime.
Usage:
* mono --profile=aot:output=out.aotprof <app>
* mono --aot=profile=out.aotprof <assembly>
The first command will run <app>, collecting the list of methods it uses into the out.aotprof file.
The second command passes the profile file to the AOT compiler to have it generate additional generic instances.
* [docs] Add a section for AOT profiling to the mono(1) man page.
* [build] Collect AOT profile info from building mscorlib in the build profile, and use it when aot-ing the csc assemblies.
* [runtime] Add missing mono-profiler-aot.h file.
* [runtime] Tidy up usage of MONO_PROFILER_API.
* [aot] Improve error handling in the aot profiler.
* [aot] Improve error handling, add more diagnostics.
Diffstat (limited to 'mcs/class/aot-compiler')
-rw-r--r-- | mcs/class/aot-compiler/Makefile | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/mcs/class/aot-compiler/Makefile b/mcs/class/aot-compiler/Makefile index 505f91591ec..bcf7c1ba5ba 100644 --- a/mcs/class/aot-compiler/Makefile +++ b/mcs/class/aot-compiler/Makefile @@ -40,29 +40,34 @@ LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION) ifndef SKIP_AOT +profile_file=$(wildcard $(topdir)/class/lib/build/csc.aotprofile) +ifneq ($(profile_file),) +profile_arg=,profile=$(profile_file) +endif + ifdef PLATFORM_AOT_SUFFIX $(mcs_aot_image): $(mcs_exe) $(mscorlib_dll) $(runtime_dep) - $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(mcs_aot_image) --debug $(mcs_exe) || cat $(PROFILE)_aot.log || (cat $(PROFILE)_aot.log; exit 1) + $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(mcs_aot_image) --debug $(mcs_exe) || cat $(PROFILE)_aot.log || (cat $(PROFILE)_aot.log; exit 1) $(csc_aot_image): $(csc_exe) $(mscorlib_dll) $(runtime_dep) - $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(csc_aot_image) --debug $(csc_exe) || cat $(PROFILE)_aot.log || (cat $(PROFILE)_aot.log; exit 1) + $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(csc_aot_image) --debug $(csc_exe) || cat $(PROFILE)_aot.log || (cat $(PROFILE)_aot.log; exit 1) $(mscorlib_aot_image): $(mscorlib_dll) $(runtime_dep) - $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version --debug $(mscorlib_dll) || (cat $(PROFILE)_aot.log; exit 1) + $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg) --debug $(mscorlib_dll) || (cat $(PROFILE)_aot.log; exit 1) # Disabled as it hits AOT too big limit $(csc_MC_image): $(csc_MC_dll) $(runtime_dep) - $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(csc_MC_image) --debug $(csc_MC_dll) || (cat $(PROFILE)_aot.log; exit 1) + $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(csc_MC_image) --debug $(csc_MC_dll) || (cat $(PROFILE)_aot.log; exit 1) # Disabled as it hits AOT too big limit $(csc_MCS_image): $(csc_MCS_dll) $(runtime_dep) - $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(csc_MCS_image) --debug $(csc_MCS_dll) || (cat $(PROFILE)_aot.log; exit 1) + $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(csc_MCS_image) --debug $(csc_MCS_dll) || (cat $(PROFILE)_aot.log; exit 1) $(csc_SRM_image): $(csc_SRM_dll) $(runtime_dep) - $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(csc_SRM_image) --debug $(csc_SRM_dll) || (cat $(PROFILE)_aot.log; exit 1) + $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(csc_SRM_image) --debug $(csc_SRM_dll) || (cat $(PROFILE)_aot.log; exit 1) $(csc_SCI_image): $(csc_SCI_dll) $(runtime_dep) - $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(csc_SCI_image) --debug $(csc_SCI_dll) || (cat $(PROFILE)_aot.log; exit 1) + $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(csc_SCI_image) --debug $(csc_SCI_dll) || (cat $(PROFILE)_aot.log; exit 1) ifdef ENABLE_AOT |