[profiler] Split method_leave callback into a method_tail_call callback.
authorAlex Rønne Petersen <alpeters@microsoft.com>
Mon, 7 Aug 2017 20:30:59 +0000 (22:30 +0200)
committerAlex Rønne Petersen <alpeters@microsoft.com>
Mon, 7 Aug 2017 20:47:55 +0000 (22:47 +0200)
commita5bc0ce8a0faf81e0a46f9c7d9d7a0913298c057
treeacba33efe37d0707964240b65882e62d41c64034
parentb40ae96a9b9c10f650c21aa5ba5769b992e243e2
[profiler] Split method_leave callback into a method_tail_call callback.

With this, profilers can distinguish between the two, and also know what the
target method of a tail call is.

The call instrumentation flags have been renamed accordingly and a new flag has
been added for instrumenting tail calls. I've also added a flag for exceptional
leave events, and method_exception_leave is only raised if this flag is given
for a method.

Also refactored the relevant JIT code a bit so it's easier to follow.
mono/metadata/profiler-events.h
mono/metadata/profiler.h
mono/mini/interp/interp.c
mono/mini/interp/transform.c
mono/mini/method-to-ir.c
mono/mini/mini-exceptions.c
mono/mini/mini-profiler.c
mono/mini/mini-runtime.c
mono/mini/mini.h
mono/profiler/log.c
samples/profiler/sample.c