diff options
author | Massimiliano Mantione <massi@mono-cvs.ximian.com> | 2008-10-10 18:20:44 +0400 |
---|---|---|
committer | Massimiliano Mantione <massi@mono-cvs.ximian.com> | 2008-10-10 18:20:44 +0400 |
commit | 73b0c1958f596be55064326243c3fcf08587e7d1 (patch) | |
tree | 31686544c2f29dd7900fba9f68ece395f66c8f64 /Mono.Profiler/profiler-decoder-library/EventProcessor.cs | |
parent | 348248edb15c4370a7fca451cda2da070ad4fe46 (diff) |
Added support for handling the stack trace of each allocation event.
svn path=/trunk/mono-tools/; revision=115434
Diffstat (limited to 'Mono.Profiler/profiler-decoder-library/EventProcessor.cs')
-rw-r--r-- | Mono.Profiler/profiler-decoder-library/EventProcessor.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Mono.Profiler/profiler-decoder-library/EventProcessor.cs b/Mono.Profiler/profiler-decoder-library/EventProcessor.cs index 65c76b52..cf7e580b 100644 --- a/Mono.Profiler/profiler-decoder-library/EventProcessor.cs +++ b/Mono.Profiler/profiler-decoder-library/EventProcessor.cs @@ -208,13 +208,21 @@ namespace Mono.Profiler { public override void ClassEndUnload (LoadedClass c, ulong counter) {} public override void Allocation (LoadedClass c, uint size, LoadedMethod caller, bool jitTime, ulong counter) { + StackTrace trace; + + if (Directives.AllocationsHaveStackTrace) { + trace = StackTrace.NewStackTrace (stack); + } else { + trace = null; + } + if (caller == null) { if ((stack != null) && (stack.StackTop != null)) { caller = stack.StackTop.Method; jitTime = stack.StackTop.IsBeingJitted; } } - c.InstanceCreated (size, caller, jitTime); + c.InstanceCreated (size, caller, jitTime, trace); } public override void Exception (LoadedClass c, ulong counter) {} @@ -239,6 +247,9 @@ namespace Mono.Profiler { public override void MethodFreed (LoadedMethod m, ulong counter) {} + public override void AdjustStack (uint lastValidFrame, uint topSectionSize, StackSectionElement<LoadedClass,LoadedMethod>[] topSection) { + stack.AdjustStack (lastValidFrame, topSectionSize, topSection); + } uint remainingCallersInChain; IStatisticalHitItem lastCallee; |