diff options
author | Massimiliano Mantione <massi@mono-cvs.ximian.com> | 2008-08-20 12:56:46 +0400 |
---|---|---|
committer | Massimiliano Mantione <massi@mono-cvs.ximian.com> | 2008-08-20 12:56:46 +0400 |
commit | 52bd37177af30ff8222efd07b63da217af850496 (patch) | |
tree | db17dde5e561e5b33302cc1844f8b5a643d4f710 /Mono.Profiler/profiler-decoder-library/BaseTypes.cs | |
parent | 7f4e614907b7b88ed90c8008cd6e1d885d6777c1 (diff) |
Added support for directives in the log file.
svn path=/trunk/mono-tools/; revision=111087
Diffstat (limited to 'Mono.Profiler/profiler-decoder-library/BaseTypes.cs')
-rw-r--r-- | Mono.Profiler/profiler-decoder-library/BaseTypes.cs | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/Mono.Profiler/profiler-decoder-library/BaseTypes.cs b/Mono.Profiler/profiler-decoder-library/BaseTypes.cs index 5e7ef698..d183447d 100644 --- a/Mono.Profiler/profiler-decoder-library/BaseTypes.cs +++ b/Mono.Profiler/profiler-decoder-library/BaseTypes.cs @@ -100,6 +100,8 @@ namespace Mono.Profiler { HS[] HeapSnapshots {get;} } public interface IProfilerEventHandler<LC,LM,UFR,UFI,MR,EH,HO,HS> where LC : ILoadedClass where LM : ILoadedMethod<LC> where UFR : IUnmanagedFunctionFromRegion where UFI : IUnmanagedFunctionFromID<MR,UFR> where MR : IExecutableMemoryRegion<UFR> where EH : ILoadedElementHandler<LC,LM,UFR,UFI,MR,HO,HS> where HO: IHeapObject<HO,LC> where HS: IHeapSnapshot<HO,LC> { + DirectivesHandler Directives {get;} + EH LoadedElements {get;} void Start (uint version, string runtimeFile, ProfilerFlags flags, ulong startCounter, DateTime startTime); @@ -122,7 +124,7 @@ namespace Mono.Profiler { void ClassStartUnload (LC c, ulong counter); void ClassEndUnload (LC c, ulong counter); - void Allocation (LC c, uint size); + void Allocation (LC c, uint size, LM caller, ulong counter); void Exception (LC c, ulong counter); void MethodEnter (LM m, ulong counter); @@ -627,7 +629,36 @@ namespace Mono.Profiler { } } + public enum DirectiveCodes { + END = 0, + ALLOCATIONS_CARRY_CALLER = 1, + LAST + } + + public class DirectivesHandler { + bool allocationsCarryCallerMethod; + public bool AllocationsCarryCallerMethod { + get { + return allocationsCarryCallerMethod; + } + } + public void AllocationsCarryCallerMethodReceived () { + allocationsCarryCallerMethod = true; + } + + public DirectivesHandler () { + allocationsCarryCallerMethod = false; + } + } + public class BaseProfilerEventHandler<LC,LM,UFR,UFI,MR,EH,HO,HS> : IProfilerEventHandler<LC,LM,UFR,UFI,MR,EH,HO,HS> where LC : ILoadedClass where LM : ILoadedMethod<LC> where UFR : IUnmanagedFunctionFromRegion where UFI : IUnmanagedFunctionFromID<MR,UFR> where MR : IExecutableMemoryRegion<UFR> where EH : ILoadedElementHandler<LC,LM,UFR,UFI,MR,HO,HS> where HO: IHeapObject<HO,LC> where HS: IHeapSnapshot<HO,LC> { + DirectivesHandler directives = new DirectivesHandler (); + public DirectivesHandler Directives { + get { + return directives; + } + } + EH loadedElements; public EH LoadedElements { get { @@ -659,7 +690,7 @@ namespace Mono.Profiler { public virtual void ClassStartUnload (LC c, ulong counter) {} public virtual void ClassEndUnload (LC c, ulong counter) {} - public virtual void Allocation (LC c, uint size) {} + public virtual void Allocation (LC c, uint size, LM caller, ulong counter) {} public virtual void Exception (LC c, ulong counter) {} public virtual void MethodEnter (LM m, ulong counter) {} |