[profiler] Fix statistical backtraces to work and collect as many frames as possible.
commita18dffad0d42e5933d87561374ce0696f22e4761
authorRodrigo Kumpera <kumpera@gmail.com>
Mon, 10 Nov 2014 20:50:57 +0000 (10 15:50 -0500)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 10 Nov 2014 23:41:15 +0000 (10 18:41 -0500)
tree2d4908d598f88800eb962e3841ee969ef20bba83
parent3aa7f41beda5970ce2fe07f35bb820552a0c531f
[profiler] Fix statistical backtraces to work and collect as many frames as possible.

This is a jumbo commit that addresses multiple issues with statistical backtrace collection:

1) It's not possible to reliably collect MonoMethod* so we check that they exist before
serializing to the .mlpd file and retrieve in sync context.

2) It was reporting the generic instance MonoMethod* under gsharing. Those methods are
not reported to the profiler since they are never compiled. They would turn out as unknowns.

3) Collecting IL offsets from async context is currently impossible to be done safely, so it's
now disabled. The way we'll do it in the future is by serializing the sequence point table when
JIT'ing.

4) The way we used to collect frames in statistical ignored all frames until the first LMF, which
discards a lot of them under statistical mode. We now properly pass sigcontext and have it been consumed.
In the future we should simply use the callchain mode.
mono/profiler/proflog.c