2013-10-18 Edward Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / libsanitizer / tsan / tsan_stat.h
blob8b08a024be2671ddc24255bd386a48626168c1f7
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___libc_memalign,
99 StatInt_calloc,
100 StatInt_realloc,
101 StatInt_free,
102 StatInt_cfree,
103 StatInt_mmap,
104 StatInt_mmap64,
105 StatInt_munmap,
106 StatInt_memalign,
107 StatInt_valloc,
108 StatInt_pvalloc,
109 StatInt_posix_memalign,
110 StatInt__Znwm,
111 StatInt__ZnwmRKSt9nothrow_t,
112 StatInt__Znam,
113 StatInt__ZnamRKSt9nothrow_t,
114 StatInt__ZdlPv,
115 StatInt__ZdlPvRKSt9nothrow_t,
116 StatInt__ZdaPv,
117 StatInt__ZdaPvRKSt9nothrow_t,
118 StatInt_strlen,
119 StatInt_memset,
120 StatInt_memcpy,
121 StatInt_strcmp,
122 StatInt_memchr,
123 StatInt_memrchr,
124 StatInt_memmove,
125 StatInt_memcmp,
126 StatInt_strchr,
127 StatInt_strchrnul,
128 StatInt_strrchr,
129 StatInt_strncmp,
130 StatInt_strcpy,
131 StatInt_strncpy,
132 StatInt_strstr,
133 StatInt_atexit,
134 StatInt___cxa_guard_acquire,
135 StatInt___cxa_guard_release,
136 StatInt___cxa_guard_abort,
137 StatInt_pthread_create,
138 StatInt_pthread_join,
139 StatInt_pthread_detach,
140 StatInt_pthread_mutex_init,
141 StatInt_pthread_mutex_destroy,
142 StatInt_pthread_mutex_lock,
143 StatInt_pthread_mutex_trylock,
144 StatInt_pthread_mutex_timedlock,
145 StatInt_pthread_mutex_unlock,
146 StatInt_pthread_spin_init,
147 StatInt_pthread_spin_destroy,
148 StatInt_pthread_spin_lock,
149 StatInt_pthread_spin_trylock,
150 StatInt_pthread_spin_unlock,
151 StatInt_pthread_rwlock_init,
152 StatInt_pthread_rwlock_destroy,
153 StatInt_pthread_rwlock_rdlock,
154 StatInt_pthread_rwlock_tryrdlock,
155 StatInt_pthread_rwlock_timedrdlock,
156 StatInt_pthread_rwlock_wrlock,
157 StatInt_pthread_rwlock_trywrlock,
158 StatInt_pthread_rwlock_timedwrlock,
159 StatInt_pthread_rwlock_unlock,
160 StatInt_pthread_cond_init,
161 StatInt_pthread_cond_destroy,
162 StatInt_pthread_cond_signal,
163 StatInt_pthread_cond_broadcast,
164 StatInt_pthread_cond_wait,
165 StatInt_pthread_cond_timedwait,
166 StatInt_pthread_barrier_init,
167 StatInt_pthread_barrier_destroy,
168 StatInt_pthread_barrier_wait,
169 StatInt_pthread_once,
170 StatInt_sem_init,
171 StatInt_sem_destroy,
172 StatInt_sem_wait,
173 StatInt_sem_trywait,
174 StatInt_sem_timedwait,
175 StatInt_sem_post,
176 StatInt_sem_getvalue,
177 StatInt_stat,
178 StatInt___xstat,
179 StatInt_stat64,
180 StatInt___xstat64,
181 StatInt_lstat,
182 StatInt___lxstat,
183 StatInt_lstat64,
184 StatInt___lxstat64,
185 StatInt_fstat,
186 StatInt___fxstat,
187 StatInt_fstat64,
188 StatInt___fxstat64,
189 StatInt_open,
190 StatInt_open64,
191 StatInt_creat,
192 StatInt_creat64,
193 StatInt_dup,
194 StatInt_dup2,
195 StatInt_dup3,
196 StatInt_eventfd,
197 StatInt_signalfd,
198 StatInt_inotify_init,
199 StatInt_inotify_init1,
200 StatInt_socket,
201 StatInt_socketpair,
202 StatInt_connect,
203 StatInt_bind,
204 StatInt_listen,
205 StatInt_accept,
206 StatInt_accept4,
207 StatInt_epoll_create,
208 StatInt_epoll_create1,
209 StatInt_close,
210 StatInt___close,
211 StatInt___res_iclose,
212 StatInt_pipe,
213 StatInt_pipe2,
214 StatInt_read,
215 StatInt_prctl,
216 StatInt_pread,
217 StatInt_pread64,
218 StatInt_readv,
219 StatInt_preadv64,
220 StatInt_write,
221 StatInt_pwrite,
222 StatInt_pwrite64,
223 StatInt_writev,
224 StatInt_pwritev64,
225 StatInt_send,
226 StatInt_sendmsg,
227 StatInt_recv,
228 StatInt_recvmsg,
229 StatInt_unlink,
230 StatInt_fopen,
231 StatInt_freopen,
232 StatInt_fclose,
233 StatInt_fread,
234 StatInt_fwrite,
235 StatInt_puts,
236 StatInt_rmdir,
237 StatInt_opendir,
238 StatInt_epoll_ctl,
239 StatInt_epoll_wait,
240 StatInt_poll,
241 StatInt_sigaction,
242 StatInt_signal,
243 StatInt_raise,
244 StatInt_kill,
245 StatInt_pthread_kill,
246 StatInt_sleep,
247 StatInt_usleep,
248 StatInt_nanosleep,
249 StatInt_gettimeofday,
250 StatInt_fork,
251 StatInt_vscanf,
252 StatInt_vsscanf,
253 StatInt_vfscanf,
254 StatInt_scanf,
255 StatInt_sscanf,
256 StatInt_fscanf,
257 StatInt___isoc99_vscanf,
258 StatInt___isoc99_vsscanf,
259 StatInt___isoc99_vfscanf,
260 StatInt___isoc99_scanf,
261 StatInt___isoc99_sscanf,
262 StatInt___isoc99_fscanf,
263 StatInt_on_exit,
264 StatInt___cxa_atexit,
265 StatInt_localtime,
266 StatInt_localtime_r,
267 StatInt_gmtime,
268 StatInt_gmtime_r,
269 StatInt_ctime,
270 StatInt_ctime_r,
271 StatInt_asctime,
272 StatInt_asctime_r,
274 // Dynamic annotations.
275 StatAnnotation,
276 StatAnnotateHappensBefore,
277 StatAnnotateHappensAfter,
278 StatAnnotateCondVarSignal,
279 StatAnnotateCondVarSignalAll,
280 StatAnnotateMutexIsNotPHB,
281 StatAnnotateCondVarWait,
282 StatAnnotateRWLockCreate,
283 StatAnnotateRWLockCreateStatic,
284 StatAnnotateRWLockDestroy,
285 StatAnnotateRWLockAcquired,
286 StatAnnotateRWLockReleased,
287 StatAnnotateTraceMemory,
288 StatAnnotateFlushState,
289 StatAnnotateNewMemory,
290 StatAnnotateNoOp,
291 StatAnnotateFlushExpectedRaces,
292 StatAnnotateEnableRaceDetection,
293 StatAnnotateMutexIsUsedAsCondVar,
294 StatAnnotatePCQGet,
295 StatAnnotatePCQPut,
296 StatAnnotatePCQDestroy,
297 StatAnnotatePCQCreate,
298 StatAnnotateExpectRace,
299 StatAnnotateBenignRaceSized,
300 StatAnnotateBenignRace,
301 StatAnnotateIgnoreReadsBegin,
302 StatAnnotateIgnoreReadsEnd,
303 StatAnnotateIgnoreWritesBegin,
304 StatAnnotateIgnoreWritesEnd,
305 StatAnnotatePublishMemoryRange,
306 StatAnnotateUnpublishMemoryRange,
307 StatAnnotateThreadName,
309 // Internal mutex contentionz.
310 StatMtxTotal,
311 StatMtxTrace,
312 StatMtxThreads,
313 StatMtxReport,
314 StatMtxSyncVar,
315 StatMtxSyncTab,
316 StatMtxSlab,
317 StatMtxAnnotations,
318 StatMtxAtExit,
319 StatMtxMBlock,
320 StatMtxJavaMBlock,
321 StatMtxFD,
323 // This must be the last.
324 StatCnt
327 } // namespace __tsan
329 #endif // TSAN_STAT_H