]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/compiler-rt/lib/tsan/rtl/tsan_stat.h
Merge compiler-rt trunk r300890, and update build glue.
[FreeBSD/FreeBSD.git] / contrib / compiler-rt / lib / tsan / rtl / tsan_stat.h
1 //===-- tsan_stat.h ---------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file is a part of ThreadSanitizer (TSan), a race detector.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef TSAN_STAT_H
15 #define TSAN_STAT_H
16
17 namespace __tsan {
18
19 enum StatType {
20   // Memory access processing related stuff.
21   StatMop,
22   StatMopRead,
23   StatMopWrite,
24   StatMop1,  // These must be consequtive.
25   StatMop2,
26   StatMop4,
27   StatMop8,
28   StatMopSame,
29   StatMopIgnored,
30   StatMopRange,
31   StatMopRodata,
32   StatMopRangeRodata,
33   StatShadowProcessed,
34   StatShadowZero,
35   StatShadowNonZero,  // Derived.
36   StatShadowSameSize,
37   StatShadowIntersect,
38   StatShadowNotIntersect,
39   StatShadowSameThread,
40   StatShadowAnotherThread,
41   StatShadowReplace,
42
43   // Func processing.
44   StatFuncEnter,
45   StatFuncExit,
46
47   // Trace processing.
48   StatEvents,
49
50   // Threads.
51   StatThreadCreate,
52   StatThreadFinish,
53   StatThreadReuse,
54   StatThreadMaxTid,
55   StatThreadMaxAlive,
56
57   // Mutexes.
58   StatMutexCreate,
59   StatMutexDestroy,
60   StatMutexLock,
61   StatMutexUnlock,
62   StatMutexRecLock,
63   StatMutexRecUnlock,
64   StatMutexReadLock,
65   StatMutexReadUnlock,
66
67   // Synchronization.
68   StatSyncCreated,
69   StatSyncDestroyed,
70   StatSyncAcquire,
71   StatSyncRelease,
72
73   // Clocks - acquire.
74   StatClockAcquire,
75   StatClockAcquireEmpty,
76   StatClockAcquireFastRelease,
77   StatClockAcquireLarge,
78   StatClockAcquireRepeat,
79   StatClockAcquireFull,
80   StatClockAcquiredSomething,
81   // Clocks - release.
82   StatClockRelease,
83   StatClockReleaseResize,
84   StatClockReleaseFast1,
85   StatClockReleaseFast2,
86   StatClockReleaseSlow,
87   StatClockReleaseFull,
88   StatClockReleaseAcquired,
89   StatClockReleaseClearTail,
90   // Clocks - release store.
91   StatClockStore,
92   StatClockStoreResize,
93   StatClockStoreFast,
94   StatClockStoreFull,
95   StatClockStoreTail,
96   // Clocks - acquire-release.
97   StatClockAcquireRelease,
98
99   // Atomics.
100   StatAtomic,
101   StatAtomicLoad,
102   StatAtomicStore,
103   StatAtomicExchange,
104   StatAtomicFetchAdd,
105   StatAtomicFetchSub,
106   StatAtomicFetchAnd,
107   StatAtomicFetchOr,
108   StatAtomicFetchXor,
109   StatAtomicFetchNand,
110   StatAtomicCAS,
111   StatAtomicFence,
112   StatAtomicRelaxed,
113   StatAtomicConsume,
114   StatAtomicAcquire,
115   StatAtomicRelease,
116   StatAtomicAcq_Rel,
117   StatAtomicSeq_Cst,
118   StatAtomic1,
119   StatAtomic2,
120   StatAtomic4,
121   StatAtomic8,
122   StatAtomic16,
123
124   // Dynamic annotations.
125   StatAnnotation,
126   StatAnnotateHappensBefore,
127   StatAnnotateHappensAfter,
128   StatAnnotateCondVarSignal,
129   StatAnnotateCondVarSignalAll,
130   StatAnnotateMutexIsNotPHB,
131   StatAnnotateCondVarWait,
132   StatAnnotateRWLockCreate,
133   StatAnnotateRWLockCreateStatic,
134   StatAnnotateRWLockDestroy,
135   StatAnnotateRWLockAcquired,
136   StatAnnotateRWLockReleased,
137   StatAnnotateTraceMemory,
138   StatAnnotateFlushState,
139   StatAnnotateNewMemory,
140   StatAnnotateNoOp,
141   StatAnnotateFlushExpectedRaces,
142   StatAnnotateEnableRaceDetection,
143   StatAnnotateMutexIsUsedAsCondVar,
144   StatAnnotatePCQGet,
145   StatAnnotatePCQPut,
146   StatAnnotatePCQDestroy,
147   StatAnnotatePCQCreate,
148   StatAnnotateExpectRace,
149   StatAnnotateBenignRaceSized,
150   StatAnnotateBenignRace,
151   StatAnnotateIgnoreReadsBegin,
152   StatAnnotateIgnoreReadsEnd,
153   StatAnnotateIgnoreWritesBegin,
154   StatAnnotateIgnoreWritesEnd,
155   StatAnnotateIgnoreSyncBegin,
156   StatAnnotateIgnoreSyncEnd,
157   StatAnnotatePublishMemoryRange,
158   StatAnnotateUnpublishMemoryRange,
159   StatAnnotateThreadName,
160   Stat__tsan_mutex_create,
161   Stat__tsan_mutex_destroy,
162   Stat__tsan_mutex_pre_lock,
163   Stat__tsan_mutex_post_lock,
164   Stat__tsan_mutex_pre_unlock,
165   Stat__tsan_mutex_post_unlock,
166   Stat__tsan_mutex_pre_signal,
167   Stat__tsan_mutex_post_signal,
168   Stat__tsan_mutex_pre_divert,
169   Stat__tsan_mutex_post_divert,
170
171   // Internal mutex contentionz.
172   StatMtxTotal,
173   StatMtxTrace,
174   StatMtxThreads,
175   StatMtxReport,
176   StatMtxSyncVar,
177   StatMtxSyncTab,
178   StatMtxSlab,
179   StatMtxAnnotations,
180   StatMtxAtExit,
181   StatMtxMBlock,
182   StatMtxDeadlockDetector,
183   StatMtxFired,
184   StatMtxRacy,
185   StatMtxFD,
186   StatMtxGlobalProc,
187
188   // This must be the last.
189   StatCnt
190 };
191
192 }  // namespace __tsan
193
194 #endif  // TSAN_STAT_H