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