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