52385963af286574df6f2ed7651242abfb0c03c0
[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/profiler/log.h : SAMPLE_*
142         public enum LogSampleHitType {
143                 Cycles = 1,
144                 Instructions = 2,
145                 CacheMisses = 3,
146                 CacheHits = 4,
147                 Branches = 5,
148                 BranchMisses = 6,
149         }
150
151         // mono/metadata/profiler.h : MonoProfileGCRootType
152         [Flags]
153         public enum LogHeapRootAttributes {
154                 Pinning = 1 << 8,
155                 WeakReference = 2 << 8,
156                 Interior = 4 << 8,
157
158                 Stack = 0,
159                 Finalizer = 1,
160                 Handle = 2,
161                 Other = 3,
162                 Miscellaneous = 4,
163
164                 TypeMask = 0xff,
165         }
166
167         // mono/metadata/profiler.h : MonoProfilerMonitorEvent
168         public enum LogMonitorEvent {
169                 Contention = 1,
170                 Done = 2,
171                 Fail = 3,
172         }
173
174         // mono/metadata/metadata.h : MonoExceptionEnum
175         public enum LogExceptionClause {
176                 Catch = 0,
177                 Filter = 1,
178                 Finally = 2,
179                 Fault = 4,
180         }
181
182         // mono/metadata/profiler.h : MonoGCEvent
183         public enum LogGCEvent {
184                 Begin = 0,
185                 MarkBegin = 1,
186                 MarkEnd = 2,
187                 ReclaimBegin = 3,
188                 ReclaimEnd = 4,
189                 End = 5,
190                 PreStopWorld = 6,
191                 PostStopWorld = 7,
192                 PreStartWorld = 8,
193                 PostStartWorld = 9,
194                 PreStopWorldLocked = 10,
195                 PostStartWorldUnlocked = 11,
196         }
197
198         // mono/sgen/gc-internal-agnostic.h : GCHandleType
199         public enum LogGCHandleType {
200                 Weak = 0,
201                 WeakTrackResurrection = 1,
202                 Normal = 2,
203                 Pinned = 3,
204         }
205
206         // mono/profiler/log.h : MonoProfilerSyncPointType
207         public enum LogSynchronizationPoint {
208                 Periodic = 0,
209                 WorldStop = 1,
210                 WorldStart = 2,
211         }
212 }