[profiler] Introduce runtime control API.
[mono.git] / mcs / class / Mono.Profiler.Log / Mono.Profiler.Log / LogEnums.cs
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4
5 using System;
6
7 namespace Mono.Profiler.Log {
8
9         // mono/profiler/log.h : TYPE_*
10         enum LogEventType {
11                 Allocation = 0,
12                 GC = 1,
13                 Metadata = 2,
14                 Method = 3,
15                 Exception = 4,
16                 Monitor = 5,
17                 Heap = 6,
18                 Sample = 7,
19                 Runtime = 8,
20                 Coverage = 9,
21                 Meta = 10,
22
23                 AllocationNoBacktrace = 0 << 4,
24                 AllocationBacktrace = 1 << 4,
25
26                 GCEvent = 1 << 4,
27                 GCResize = 2 << 4,
28                 GCMove = 3 << 4,
29                 GCHandleCreationNoBacktrace = 4 << 4,
30                 GCHandleDeletionNoBacktrace = 5 << 4,
31                 GCHandleCreationBacktrace = 6 << 4,
32                 GCHandleDeletionBacktrace = 7 << 4,
33                 GCFinalizeBegin = 8 << 4,
34                 GCFinalizeEnd = 9 << 4,
35                 GCFinalizeObjectBegin = 10 << 4,
36                 GCFinalizeObjectEnd = 11 << 4,
37
38                 MetadataExtra = 0 << 4,
39                 MetadataEndLoad = 2 << 4,
40                 MetadataEndUnload = 4 << 4,
41
42                 MethodLeave = 1 << 4,
43                 MethodEnter = 2 << 4,
44                 MethodLeaveExceptional = 3 << 4,
45                 MethodJit = 4 << 4,
46
47                 ExceptionThrowNoBacktrace = 0 << 7,
48                 ExceptionThrowBacktrace = 1 << 7,
49                 ExceptionClause = 1 << 4,
50
51                 MonitorNoBacktrace = 0 << 7,
52                 MonitorBacktrace = 1 << 7,
53
54                 HeapBegin = 0 << 4,
55                 HeapEnd = 1 << 4,
56                 HeapObject = 2 << 4,
57                 HeapRoots = 3 << 4,
58
59                 SampleHit = 0 << 4,
60                 SampleUnmanagedSymbol = 1 << 4,
61                 SampleUnmanagedBinary = 2 << 4,
62                 SampleCounterDescriptions = 3 << 4,
63                 SampleCounters = 4 << 4,
64
65                 RuntimeJitHelper = 1 << 4,
66
67                 CoverageAssembly = 0 << 4,
68                 CoverageMethod = 1 << 4,
69                 CoverageStatement = 2 << 4,
70                 CoverageClass = 3 << 4,
71
72                 MetaSynchronizationPoint = 0 << 4,
73         }
74
75         // mono/profiler/log.h : TYPE_*
76         enum LogMetadataType {
77                 Class = 1,
78                 Image = 2,
79                 Assembly = 3,
80                 AppDomain = 4,
81                 Thread = 5,
82                 Context = 6,
83         }
84
85         // mono/utils/mono-counters.h : MONO_COUNTER_*
86         public enum LogCounterType {
87                 Int32 = 0,
88                 UInt32 = 1,
89                 Word = 2,
90                 Int64 = 3,
91                 UInt64 = 4,
92                 Double = 5,
93                 String = 6,
94                 Interval = 7,
95         }
96
97         // mono/utils/mono-counters.h : MONO_COUNTER_*
98         public enum LogCounterSection {
99                 Jit = 1 << 8,
100                 GC = 1 << 9,
101                 Metadata = 1 << 10,
102                 Generics = 1 << 11,
103                 Security = 1 << 12,
104                 Runtime = 1 << 13,
105                 System = 1 << 14,
106                 User = 1 << 15,
107                 Profiler = 1 << 16,
108         }
109
110         // mono/utils/mono-counters.h : MONO_COUNTER_*
111         public enum LogCounterUnit {
112                 Raw = 0 << 24,
113                 Bytes = 1 << 24,
114                 Time = 2 << 24,
115                 Count = 3 << 24,
116                 Percentage = 4 << 24,
117         }
118
119         // mono/utils/mono-counters.h : MONO_COUNTER_*
120         public enum LogCounterVariance {
121                 Monotonic = 1 << 28,
122                 Constant = 1 << 29,
123                 Variable = 1 << 30,
124         }
125
126         // mono/metadata/profiler.h : MonoProfilerCodeBufferType
127         public enum LogJitHelper {
128                 Unknown = 0,
129                 Method = 1,
130                 MethodTrampoline = 2,
131                 UnboxTrampoline = 3,
132                 ImtTrampoline = 4,
133                 GenericsTrampoline = 5,
134                 SpecificTrampoline = 6,
135                 Helper = 7,
136                 Monitor = 8,
137                 DelegateInvoke = 9,
138                 ExceptionHandling = 10,
139         }
140
141         // mono/metadata/profiler.h : MonoProfilerGCRootType
142         [Flags]
143         public enum LogHeapRootAttributes {
144                 Pinning = 1 << 8,
145                 WeakReference = 2 << 8,
146                 Interior = 4 << 8,
147
148                 Stack = 0,
149                 Finalizer = 1,
150                 Handle = 2,
151                 Other = 3,
152                 Miscellaneous = 4,
153
154                 TypeMask = 0xff,
155         }
156
157         // mono/profiler/log.h : MonoProfilerMonitorEvent
158         public enum LogMonitorEvent {
159                 Contention = 1,
160                 Done = 2,
161                 Fail = 3,
162         }
163
164         // mono/metadata/metadata.h : MonoExceptionEnum
165         public enum LogExceptionClause {
166                 Catch = 0,
167                 Filter = 1,
168                 Finally = 2,
169                 Fault = 4,
170         }
171
172         // mono/metadata/profiler.h : MonoProfilerGCEvent
173         public enum LogGCEvent {
174                 PreStopWorld = 6,
175                 PreStopWorldLocked = 10,
176                 PostStopWorld = 7,
177                 Begin = 0,
178                 End = 5,
179                 PreStartWorld = 8,
180                 PostStartWorld = 9,
181                 PostStartWorldUnlocked = 11,
182         }
183
184         // mono/metadata/mono-gc.h : MonoGCHandleType
185         public enum LogGCHandleType {
186                 Weak = 0,
187                 WeakTrackResurrection = 1,
188                 Normal = 2,
189                 Pinned = 3,
190         }
191
192         // mono/profiler/log.h : MonoProfilerSyncPointType
193         public enum LogSynchronizationPoint {
194                 Periodic = 0,
195                 WorldStop = 1,
196                 WorldStart = 2,
197         }
198
199         // mono/metadata/profiler.h : MonoProfilerSampleMode
200         public enum LogSampleMode {
201                 None = 0,
202                 Process = 1,
203                 Real = 2,
204         }
205
206         // mono/profiler/log.h : MonoProfilerHeapshotMode
207         public enum LogHeapshotMode {
208                 None = 0,
209                 EveryMajor = 1,
210                 OnDemand = 2,
211                 Milliseconds = 3,
212                 Collections = 4,
213         }
214 }