2015-02-22 Arnaud Charlet <charlet@adacore.com>
[official-gcc.git] / libsanitizer / tsan / tsan_stat.h
blob132656f035f9d40afadf32888fc80277e6392a61
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 StatClockAcquireLarge,
76 StatClockAcquireRepeat,
77 StatClockAcquireFull,
78 StatClockAcquiredSomething,
79 // Clocks - release.
80 StatClockRelease,
81 StatClockReleaseResize,
82 StatClockReleaseFast1,
83 StatClockReleaseFast2,
84 StatClockReleaseSlow,
85 StatClockReleaseFull,
86 StatClockReleaseAcquired,
87 StatClockReleaseClearTail,
88 // Clocks - release store.
89 StatClockStore,
90 StatClockStoreResize,
91 StatClockStoreFast,
92 StatClockStoreFull,
93 StatClockStoreTail,
94 // Clocks - acquire-release.
95 StatClockAcquireRelease,
97 // Atomics.
98 StatAtomic,
99 StatAtomicLoad,
100 StatAtomicStore,
101 StatAtomicExchange,
102 StatAtomicFetchAdd,
103 StatAtomicFetchSub,
104 StatAtomicFetchAnd,
105 StatAtomicFetchOr,
106 StatAtomicFetchXor,
107 StatAtomicFetchNand,
108 StatAtomicCAS,
109 StatAtomicFence,
110 StatAtomicRelaxed,
111 StatAtomicConsume,
112 StatAtomicAcquire,
113 StatAtomicRelease,
114 StatAtomicAcq_Rel,
115 StatAtomicSeq_Cst,
116 StatAtomic1,
117 StatAtomic2,
118 StatAtomic4,
119 StatAtomic8,
120 StatAtomic16,
122 // Dynamic annotations.
123 StatAnnotation,
124 StatAnnotateHappensBefore,
125 StatAnnotateHappensAfter,
126 StatAnnotateCondVarSignal,
127 StatAnnotateCondVarSignalAll,
128 StatAnnotateMutexIsNotPHB,
129 StatAnnotateCondVarWait,
130 StatAnnotateRWLockCreate,
131 StatAnnotateRWLockCreateStatic,
132 StatAnnotateRWLockDestroy,
133 StatAnnotateRWLockAcquired,
134 StatAnnotateRWLockReleased,
135 StatAnnotateTraceMemory,
136 StatAnnotateFlushState,
137 StatAnnotateNewMemory,
138 StatAnnotateNoOp,
139 StatAnnotateFlushExpectedRaces,
140 StatAnnotateEnableRaceDetection,
141 StatAnnotateMutexIsUsedAsCondVar,
142 StatAnnotatePCQGet,
143 StatAnnotatePCQPut,
144 StatAnnotatePCQDestroy,
145 StatAnnotatePCQCreate,
146 StatAnnotateExpectRace,
147 StatAnnotateBenignRaceSized,
148 StatAnnotateBenignRace,
149 StatAnnotateIgnoreReadsBegin,
150 StatAnnotateIgnoreReadsEnd,
151 StatAnnotateIgnoreWritesBegin,
152 StatAnnotateIgnoreWritesEnd,
153 StatAnnotateIgnoreSyncBegin,
154 StatAnnotateIgnoreSyncEnd,
155 StatAnnotatePublishMemoryRange,
156 StatAnnotateUnpublishMemoryRange,
157 StatAnnotateThreadName,
159 // Internal mutex contentionz.
160 StatMtxTotal,
161 StatMtxTrace,
162 StatMtxThreads,
163 StatMtxReport,
164 StatMtxSyncVar,
165 StatMtxSyncTab,
166 StatMtxSlab,
167 StatMtxAnnotations,
168 StatMtxAtExit,
169 StatMtxMBlock,
170 StatMtxJavaMBlock,
171 StatMtxDeadlockDetector,
172 StatMtxFD,
174 // This must be the last.
175 StatCnt
178 } // namespace __tsan
180 #endif // TSAN_STAT_H