2012-11-28 Marc Glisse <marc.glisse@inria.fr>
[official-gcc.git] / libsanitizer / tsan / tsan_stat.h
blob73d8c046e9a34c932df7cbbb3dd87e331fbd800f
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 StatMopRange,
28 StatShadowProcessed,
29 StatShadowZero,
30 StatShadowNonZero, // Derived.
31 StatShadowSameSize,
32 StatShadowIntersect,
33 StatShadowNotIntersect,
34 StatShadowSameThread,
35 StatShadowAnotherThread,
36 StatShadowReplace,
38 // Func processing.
39 StatFuncEnter,
40 StatFuncExit,
42 // Trace processing.
43 StatEvents,
45 // Threads.
46 StatThreadCreate,
47 StatThreadFinish,
48 StatThreadReuse,
49 StatThreadMaxTid,
50 StatThreadMaxAlive,
52 // Mutexes.
53 StatMutexCreate,
54 StatMutexDestroy,
55 StatMutexLock,
56 StatMutexUnlock,
57 StatMutexRecLock,
58 StatMutexRecUnlock,
59 StatMutexReadLock,
60 StatMutexReadUnlock,
62 // Synchronization.
63 StatSyncCreated,
64 StatSyncDestroyed,
65 StatSyncAcquire,
66 StatSyncRelease,
68 // Atomics.
69 StatAtomic,
70 StatAtomicLoad,
71 StatAtomicStore,
72 StatAtomicExchange,
73 StatAtomicFetchAdd,
74 StatAtomicFetchSub,
75 StatAtomicFetchAnd,
76 StatAtomicFetchOr,
77 StatAtomicFetchXor,
78 StatAtomicFetchNand,
79 StatAtomicCAS,
80 StatAtomicFence,
81 StatAtomicRelaxed,
82 StatAtomicConsume,
83 StatAtomicAcquire,
84 StatAtomicRelease,
85 StatAtomicAcq_Rel,
86 StatAtomicSeq_Cst,
87 StatAtomic1,
88 StatAtomic2,
89 StatAtomic4,
90 StatAtomic8,
91 StatAtomic16,
93 // Interceptors.
94 StatInterceptor,
95 StatInt_longjmp,
96 StatInt_siglongjmp,
97 StatInt_malloc,
98 StatInt_calloc,
99 StatInt_realloc,
100 StatInt_free,
101 StatInt_cfree,
102 StatInt_mmap,
103 StatInt_mmap64,
104 StatInt_munmap,
105 StatInt_memalign,
106 StatInt_valloc,
107 StatInt_pvalloc,
108 StatInt_posix_memalign,
109 StatInt__Znwm,
110 StatInt__ZnwmRKSt9nothrow_t,
111 StatInt__Znam,
112 StatInt__ZnamRKSt9nothrow_t,
113 StatInt__ZdlPv,
114 StatInt__ZdlPvRKSt9nothrow_t,
115 StatInt__ZdaPv,
116 StatInt__ZdaPvRKSt9nothrow_t,
117 StatInt_strlen,
118 StatInt_memset,
119 StatInt_memcpy,
120 StatInt_strcmp,
121 StatInt_memchr,
122 StatInt_memrchr,
123 StatInt_memmove,
124 StatInt_memcmp,
125 StatInt_strchr,
126 StatInt_strchrnul,
127 StatInt_strrchr,
128 StatInt_strncmp,
129 StatInt_strcpy,
130 StatInt_strncpy,
131 StatInt_strstr,
132 StatInt_atexit,
133 StatInt___cxa_guard_acquire,
134 StatInt___cxa_guard_release,
135 StatInt_pthread_create,
136 StatInt_pthread_join,
137 StatInt_pthread_detach,
138 StatInt_pthread_mutex_init,
139 StatInt_pthread_mutex_destroy,
140 StatInt_pthread_mutex_lock,
141 StatInt_pthread_mutex_trylock,
142 StatInt_pthread_mutex_timedlock,
143 StatInt_pthread_mutex_unlock,
144 StatInt_pthread_spin_init,
145 StatInt_pthread_spin_destroy,
146 StatInt_pthread_spin_lock,
147 StatInt_pthread_spin_trylock,
148 StatInt_pthread_spin_unlock,
149 StatInt_pthread_rwlock_init,
150 StatInt_pthread_rwlock_destroy,
151 StatInt_pthread_rwlock_rdlock,
152 StatInt_pthread_rwlock_tryrdlock,
153 StatInt_pthread_rwlock_timedrdlock,
154 StatInt_pthread_rwlock_wrlock,
155 StatInt_pthread_rwlock_trywrlock,
156 StatInt_pthread_rwlock_timedwrlock,
157 StatInt_pthread_rwlock_unlock,
158 StatInt_pthread_cond_init,
159 StatInt_pthread_cond_destroy,
160 StatInt_pthread_cond_signal,
161 StatInt_pthread_cond_broadcast,
162 StatInt_pthread_cond_wait,
163 StatInt_pthread_cond_timedwait,
164 StatInt_pthread_barrier_init,
165 StatInt_pthread_barrier_destroy,
166 StatInt_pthread_barrier_wait,
167 StatInt_pthread_once,
168 StatInt_sem_init,
169 StatInt_sem_destroy,
170 StatInt_sem_wait,
171 StatInt_sem_trywait,
172 StatInt_sem_timedwait,
173 StatInt_sem_post,
174 StatInt_sem_getvalue,
175 StatInt_read,
176 StatInt_pread,
177 StatInt_pread64,
178 StatInt_readv,
179 StatInt_preadv64,
180 StatInt_write,
181 StatInt_pwrite,
182 StatInt_pwrite64,
183 StatInt_writev,
184 StatInt_pwritev64,
185 StatInt_send,
186 StatInt_sendmsg,
187 StatInt_recv,
188 StatInt_recvmsg,
189 StatInt_unlink,
190 StatInt_fopen,
191 StatInt_fread,
192 StatInt_fwrite,
193 StatInt_puts,
194 StatInt_rmdir,
195 StatInt_opendir,
196 StatInt_epoll_ctl,
197 StatInt_epoll_wait,
198 StatInt_poll,
199 StatInt_sigaction,
200 StatInt_signal,
201 StatInt_raise,
202 StatInt_kill,
203 StatInt_pthread_kill,
204 StatInt_sleep,
205 StatInt_usleep,
206 StatInt_nanosleep,
207 StatInt_gettimeofday,
209 // Dynamic annotations.
210 StatAnnotation,
211 StatAnnotateHappensBefore,
212 StatAnnotateHappensAfter,
213 StatAnnotateCondVarSignal,
214 StatAnnotateCondVarSignalAll,
215 StatAnnotateMutexIsNotPHB,
216 StatAnnotateCondVarWait,
217 StatAnnotateRWLockCreate,
218 StatAnnotateRWLockCreateStatic,
219 StatAnnotateRWLockDestroy,
220 StatAnnotateRWLockAcquired,
221 StatAnnotateRWLockReleased,
222 StatAnnotateTraceMemory,
223 StatAnnotateFlushState,
224 StatAnnotateNewMemory,
225 StatAnnotateNoOp,
226 StatAnnotateFlushExpectedRaces,
227 StatAnnotateEnableRaceDetection,
228 StatAnnotateMutexIsUsedAsCondVar,
229 StatAnnotatePCQGet,
230 StatAnnotatePCQPut,
231 StatAnnotatePCQDestroy,
232 StatAnnotatePCQCreate,
233 StatAnnotateExpectRace,
234 StatAnnotateBenignRaceSized,
235 StatAnnotateBenignRace,
236 StatAnnotateIgnoreReadsBegin,
237 StatAnnotateIgnoreReadsEnd,
238 StatAnnotateIgnoreWritesBegin,
239 StatAnnotateIgnoreWritesEnd,
240 StatAnnotatePublishMemoryRange,
241 StatAnnotateUnpublishMemoryRange,
242 StatAnnotateThreadName,
244 // Internal mutex contentionz.
245 StatMtxTotal,
246 StatMtxTrace,
247 StatMtxThreads,
248 StatMtxReport,
249 StatMtxSyncVar,
250 StatMtxSyncTab,
251 StatMtxSlab,
252 StatMtxAnnotations,
253 StatMtxAtExit,
255 // This must be the last.
256 StatCnt
259 } // namespace __tsan
261 #endif // TSAN_STAT_H