tsan: ignore malloc/free/strdup when called from libjvm
[blocksruntime.git] / lib / tsan / rtl / tsan_stat.h
blobd3c0605785154d172ec83afedd3ae747f36bd5ee
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 StatMopRodata,
31 StatMopRangeRodata,
32 StatShadowProcessed,
33 StatShadowZero,
34 StatShadowNonZero, // Derived.
35 StatShadowSameSize,
36 StatShadowIntersect,
37 StatShadowNotIntersect,
38 StatShadowSameThread,
39 StatShadowAnotherThread,
40 StatShadowReplace,
42 // Func processing.
43 StatFuncEnter,
44 StatFuncExit,
46 // Trace processing.
47 StatEvents,
49 // Threads.
50 StatThreadCreate,
51 StatThreadFinish,
52 StatThreadReuse,
53 StatThreadMaxTid,
54 StatThreadMaxAlive,
56 // Mutexes.
57 StatMutexCreate,
58 StatMutexDestroy,
59 StatMutexLock,
60 StatMutexUnlock,
61 StatMutexRecLock,
62 StatMutexRecUnlock,
63 StatMutexReadLock,
64 StatMutexReadUnlock,
66 // Synchronization.
67 StatSyncCreated,
68 StatSyncDestroyed,
69 StatSyncAcquire,
70 StatSyncRelease,
72 // Atomics.
73 StatAtomic,
74 StatAtomicLoad,
75 StatAtomicStore,
76 StatAtomicExchange,
77 StatAtomicFetchAdd,
78 StatAtomicFetchSub,
79 StatAtomicFetchAnd,
80 StatAtomicFetchOr,
81 StatAtomicFetchXor,
82 StatAtomicFetchNand,
83 StatAtomicCAS,
84 StatAtomicFence,
85 StatAtomicRelaxed,
86 StatAtomicConsume,
87 StatAtomicAcquire,
88 StatAtomicRelease,
89 StatAtomicAcq_Rel,
90 StatAtomicSeq_Cst,
91 StatAtomic1,
92 StatAtomic2,
93 StatAtomic4,
94 StatAtomic8,
95 StatAtomic16,
97 // Interceptors.
98 StatInterceptor,
99 StatInt_longjmp,
100 StatInt_siglongjmp,
101 StatInt_malloc,
102 StatInt___libc_memalign,
103 StatInt_calloc,
104 StatInt_realloc,
105 StatInt_free,
106 StatInt_cfree,
107 StatInt_malloc_usable_size,
108 StatInt_mmap,
109 StatInt_mmap64,
110 StatInt_munmap,
111 StatInt_memalign,
112 StatInt_valloc,
113 StatInt_pvalloc,
114 StatInt_posix_memalign,
115 StatInt__Znwm,
116 StatInt__ZnwmRKSt9nothrow_t,
117 StatInt__Znam,
118 StatInt__ZnamRKSt9nothrow_t,
119 StatInt__ZdlPv,
120 StatInt__ZdlPvRKSt9nothrow_t,
121 StatInt__ZdaPv,
122 StatInt__ZdaPvRKSt9nothrow_t,
123 StatInt_strlen,
124 StatInt_memset,
125 StatInt_memcpy,
126 StatInt_strcmp,
127 StatInt_memchr,
128 StatInt_memrchr,
129 StatInt_memmove,
130 StatInt_memcmp,
131 StatInt_strchr,
132 StatInt_strchrnul,
133 StatInt_strrchr,
134 StatInt_strncmp,
135 StatInt_strcpy,
136 StatInt_strncpy,
137 StatInt_strcasecmp,
138 StatInt_strncasecmp,
139 StatInt_strstr,
140 StatInt_strdup,
141 StatInt_atexit,
142 StatInt___cxa_guard_acquire,
143 StatInt___cxa_guard_release,
144 StatInt___cxa_guard_abort,
145 StatInt_pthread_create,
146 StatInt_pthread_join,
147 StatInt_pthread_detach,
148 StatInt_pthread_mutex_init,
149 StatInt_pthread_mutex_destroy,
150 StatInt_pthread_mutex_lock,
151 StatInt_pthread_mutex_trylock,
152 StatInt_pthread_mutex_timedlock,
153 StatInt_pthread_mutex_unlock,
154 StatInt_pthread_spin_init,
155 StatInt_pthread_spin_destroy,
156 StatInt_pthread_spin_lock,
157 StatInt_pthread_spin_trylock,
158 StatInt_pthread_spin_unlock,
159 StatInt_pthread_rwlock_init,
160 StatInt_pthread_rwlock_destroy,
161 StatInt_pthread_rwlock_rdlock,
162 StatInt_pthread_rwlock_tryrdlock,
163 StatInt_pthread_rwlock_timedrdlock,
164 StatInt_pthread_rwlock_wrlock,
165 StatInt_pthread_rwlock_trywrlock,
166 StatInt_pthread_rwlock_timedwrlock,
167 StatInt_pthread_rwlock_unlock,
168 StatInt_pthread_cond_init,
169 StatInt_pthread_cond_destroy,
170 StatInt_pthread_cond_signal,
171 StatInt_pthread_cond_broadcast,
172 StatInt_pthread_cond_wait,
173 StatInt_pthread_cond_timedwait,
174 StatInt_pthread_barrier_init,
175 StatInt_pthread_barrier_destroy,
176 StatInt_pthread_barrier_wait,
177 StatInt_pthread_once,
178 StatInt_pthread_getschedparam,
179 StatInt_sem_init,
180 StatInt_sem_destroy,
181 StatInt_sem_wait,
182 StatInt_sem_trywait,
183 StatInt_sem_timedwait,
184 StatInt_sem_post,
185 StatInt_sem_getvalue,
186 StatInt_stat,
187 StatInt___xstat,
188 StatInt_stat64,
189 StatInt___xstat64,
190 StatInt_lstat,
191 StatInt___lxstat,
192 StatInt_lstat64,
193 StatInt___lxstat64,
194 StatInt_fstat,
195 StatInt___fxstat,
196 StatInt_fstat64,
197 StatInt___fxstat64,
198 StatInt_open,
199 StatInt_open64,
200 StatInt_creat,
201 StatInt_creat64,
202 StatInt_dup,
203 StatInt_dup2,
204 StatInt_dup3,
205 StatInt_eventfd,
206 StatInt_signalfd,
207 StatInt_inotify_init,
208 StatInt_inotify_init1,
209 StatInt_socket,
210 StatInt_socketpair,
211 StatInt_connect,
212 StatInt_bind,
213 StatInt_listen,
214 StatInt_accept,
215 StatInt_accept4,
216 StatInt_epoll_create,
217 StatInt_epoll_create1,
218 StatInt_close,
219 StatInt___close,
220 StatInt___res_iclose,
221 StatInt_pipe,
222 StatInt_pipe2,
223 StatInt_read,
224 StatInt_prctl,
225 StatInt_pread,
226 StatInt_pread64,
227 StatInt_readv,
228 StatInt_preadv,
229 StatInt_preadv64,
230 StatInt_write,
231 StatInt_pwrite,
232 StatInt_pwrite64,
233 StatInt_writev,
234 StatInt_pwritev,
235 StatInt_pwritev64,
236 StatInt_send,
237 StatInt_sendmsg,
238 StatInt_recv,
239 StatInt_recvmsg,
240 StatInt_unlink,
241 StatInt_fopen,
242 StatInt_freopen,
243 StatInt_fclose,
244 StatInt_fread,
245 StatInt_fwrite,
246 StatInt_fflush,
247 StatInt_abort,
248 StatInt_puts,
249 StatInt_rmdir,
250 StatInt_opendir,
251 StatInt_epoll_ctl,
252 StatInt_epoll_wait,
253 StatInt_poll,
254 StatInt_ppoll,
255 StatInt_sigaction,
256 StatInt_signal,
257 StatInt_sigsuspend,
258 StatInt_raise,
259 StatInt_kill,
260 StatInt_pthread_kill,
261 StatInt_sleep,
262 StatInt_usleep,
263 StatInt_nanosleep,
264 StatInt_gettimeofday,
265 StatInt_fork,
266 StatInt_vscanf,
267 StatInt_vsscanf,
268 StatInt_vfscanf,
269 StatInt_scanf,
270 StatInt_sscanf,
271 StatInt_fscanf,
272 StatInt___isoc99_vscanf,
273 StatInt___isoc99_vsscanf,
274 StatInt___isoc99_vfscanf,
275 StatInt___isoc99_scanf,
276 StatInt___isoc99_sscanf,
277 StatInt___isoc99_fscanf,
278 StatInt_on_exit,
279 StatInt___cxa_atexit,
280 StatInt_localtime,
281 StatInt_localtime_r,
282 StatInt_gmtime,
283 StatInt_gmtime_r,
284 StatInt_ctime,
285 StatInt_ctime_r,
286 StatInt_asctime,
287 StatInt_asctime_r,
288 StatInt_frexp,
289 StatInt_frexpf,
290 StatInt_frexpl,
291 StatInt_getpwnam,
292 StatInt_getpwuid,
293 StatInt_getgrnam,
294 StatInt_getgrgid,
295 StatInt_getpwnam_r,
296 StatInt_getpwuid_r,
297 StatInt_getgrnam_r,
298 StatInt_getgrgid_r,
299 StatInt_clock_getres,
300 StatInt_clock_gettime,
301 StatInt_clock_settime,
302 StatInt_getitimer,
303 StatInt_setitimer,
304 StatInt_time,
305 StatInt_glob,
306 StatInt_glob64,
307 StatInt_wait,
308 StatInt_waitid,
309 StatInt_waitpid,
310 StatInt_wait3,
311 StatInt_wait4,
312 StatInt_inet_ntop,
313 StatInt_inet_pton,
314 StatInt_inet_aton,
315 StatInt_getaddrinfo,
316 StatInt_getnameinfo,
317 StatInt_getsockname,
318 StatInt_gethostent,
319 StatInt_gethostbyname,
320 StatInt_gethostbyname2,
321 StatInt_gethostbyaddr,
322 StatInt_gethostent_r,
323 StatInt_gethostbyname_r,
324 StatInt_gethostbyname2_r,
325 StatInt_gethostbyaddr_r,
326 StatInt_getsockopt,
327 StatInt_modf,
328 StatInt_modff,
329 StatInt_modfl,
330 StatInt_getpeername,
331 StatInt_ioctl,
332 StatInt_sysinfo,
333 StatInt_readdir,
334 StatInt_readdir64,
335 StatInt_readdir_r,
336 StatInt_readdir64_r,
337 StatInt_ptrace,
338 StatInt_setlocale,
339 StatInt_getcwd,
340 StatInt_get_current_dir_name,
341 StatInt_strtoimax,
342 StatInt_strtoumax,
343 StatInt_mbstowcs,
344 StatInt_mbsrtowcs,
345 StatInt_mbsnrtowcs,
346 StatInt_wcstombs,
347 StatInt_wcsrtombs,
348 StatInt_wcsnrtombs,
349 StatInt_tcgetattr,
350 StatInt_realpath,
351 StatInt_canonicalize_file_name,
352 StatInt_confstr,
353 StatInt_sched_getaffinity,
354 StatInt_strerror,
355 StatInt_strerror_r,
356 StatInt_scandir,
357 StatInt_scandir64,
358 StatInt_getgroups,
360 // Dynamic annotations.
361 StatAnnotation,
362 StatAnnotateHappensBefore,
363 StatAnnotateHappensAfter,
364 StatAnnotateCondVarSignal,
365 StatAnnotateCondVarSignalAll,
366 StatAnnotateMutexIsNotPHB,
367 StatAnnotateCondVarWait,
368 StatAnnotateRWLockCreate,
369 StatAnnotateRWLockCreateStatic,
370 StatAnnotateRWLockDestroy,
371 StatAnnotateRWLockAcquired,
372 StatAnnotateRWLockReleased,
373 StatAnnotateTraceMemory,
374 StatAnnotateFlushState,
375 StatAnnotateNewMemory,
376 StatAnnotateNoOp,
377 StatAnnotateFlushExpectedRaces,
378 StatAnnotateEnableRaceDetection,
379 StatAnnotateMutexIsUsedAsCondVar,
380 StatAnnotatePCQGet,
381 StatAnnotatePCQPut,
382 StatAnnotatePCQDestroy,
383 StatAnnotatePCQCreate,
384 StatAnnotateExpectRace,
385 StatAnnotateBenignRaceSized,
386 StatAnnotateBenignRace,
387 StatAnnotateIgnoreReadsBegin,
388 StatAnnotateIgnoreReadsEnd,
389 StatAnnotateIgnoreWritesBegin,
390 StatAnnotateIgnoreWritesEnd,
391 StatAnnotatePublishMemoryRange,
392 StatAnnotateUnpublishMemoryRange,
393 StatAnnotateThreadName,
395 // Internal mutex contentionz.
396 StatMtxTotal,
397 StatMtxTrace,
398 StatMtxThreads,
399 StatMtxReport,
400 StatMtxSyncVar,
401 StatMtxSyncTab,
402 StatMtxSlab,
403 StatMtxAnnotations,
404 StatMtxAtExit,
405 StatMtxMBlock,
406 StatMtxJavaMBlock,
407 StatMtxFD,
409 // This must be the last.
410 StatCnt
413 } // namespace __tsan
415 #endif // TSAN_STAT_H