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