[runtime] New profiler API.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Thu, 22 Jun 2017 15:15:35 +0000 (17:15 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Thu, 6 Jul 2017 09:32:29 +0000 (11:32 +0200)
commitea4e4a9ef6fc42570a23026adbe826cf7248290e
tree16a072acabaab62ac66a725cebc4426143ed746a
parentdc2e330a9ff2d5c5271693d5b8d685aa8c0dd3b2
[runtime] New profiler API.

* Profiler callbacks can now be changed and disabled at any point.
* API users no longer have to set event flags. The API instead uses a counter
  internally for each type of callback.
* Filter functions for enter/leave instrumentation can be installed, and they
  can choose whether to instrument the prologue, epilogue, or both.
* Managed allocators can now be instrumented for allocation profiling.
* A profiler must now declare that it wishes to use allocation profiling and/or
  sampling in its init function.
* Sampling parameters can now be changed at any point, and the sampling thread
  can be put into an idle mode when no sampling is needed.
* Only one profiler can have control over the sampling parameters. Whichever
  profiler enables sampling first gets control.
* Adding new events is now very easy: One line in profiler-events.h and one
  line wherever the event should be raised.
* Lifted the restriction that enter/leave instrumentation would cause an abort
  in full AOT mode.
* Support for call chain sampling has been removed.
* Support for the old, platform-specific code coverage mode has been removed.
* The new profiler module entry point is mono_profiler_init. If a module has
  a mono_profiler_startup symbol (the old entry point), a warning will be
  printed and the module won't be loaded.
* Updated the profiler test suite to work with instrumented managed allocators.
70 files changed:
mcs/class/Mono.Profiler.Log/Mono.Profiler.Log/LogEnums.cs
mono/cil/cil-opcodes.xml
mono/cil/opcode.def
mono/metadata/Makefile.am
mono/metadata/appdomain.c
mono/metadata/assembly.c
mono/metadata/boehm-gc.c
mono/metadata/class.c
mono/metadata/domain.c
mono/metadata/dynamic-image.c
mono/metadata/gc-internals.h
mono/metadata/gc.c
mono/metadata/image.c
mono/metadata/loader.c
mono/metadata/monitor.c
mono/metadata/mono-gc.h
mono/metadata/object.c
mono/metadata/profiler-events.h [new file with mode: 0644]
mono/metadata/profiler-private.h
mono/metadata/profiler.c
mono/metadata/profiler.h
mono/metadata/sgen-client-mono.h
mono/metadata/sgen-mono.c
mono/metadata/sgen-stw.c
mono/metadata/sre.c
mono/metadata/threads.c
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/debugger-agent.c
mono/mini/exceptions-amd64.c
mono/mini/exceptions-arm64.c
mono/mini/exceptions-mips.c
mono/mini/exceptions-ppc.c
mono/mini/exceptions-s390x.c
mono/mini/exceptions-x86.c
mono/mini/interp/interp.c
mono/mini/interp/transform.c
mono/mini/method-to-ir.c
mono/mini/mini-amd64.c
mono/mini/mini-arm.c
mono/mini/mini-exceptions.c
mono/mini/mini-mips.c
mono/mini/mini-posix.c
mono/mini/mini-ppc.c
mono/mini/mini-runtime.c
mono/mini/mini-s390x.c
mono/mini/mini-sparc.c
mono/mini/mini-windows.c
mono/mini/mini-x86.c
mono/mini/mini.c
mono/mini/mini.h
mono/mini/patch-info.h
mono/mini/tramp-amd64-gsharedvt.c
mono/mini/tramp-amd64.c
mono/mini/tramp-arm.c
mono/mini/tramp-arm64.c
mono/mini/tramp-s390x.c
mono/mini/tramp-x86.c
mono/profiler/aot.c
mono/profiler/iomap.c
mono/profiler/log-args.c
mono/profiler/log.c
mono/profiler/log.h
mono/profiler/mprof-report.c
mono/profiler/ptestrunner.pl
mono/profiler/vtune.c
mono/utils/mono-codeman.c
mono/utils/mono-io-portability.c
samples/profiler/sample.c
samples/size/size.c