Home
last modified time | relevance | path

Searched refs:ThreadState (Results 1 – 25 of 87) sorted by relevance

1234

/external/llvm-project/compiler-rt/lib/tsan/rtl/
Dtsan_rtl.h343 ThreadState *thr; // currently wired thread, or nullptr
365 struct ThreadState { struct
381 ThreadState* current; argument
450 explicit ThreadState(Context *ctx, int tid, int unique_id, u64 epoch, argument
458 ThreadState *cur_thread();
459 void set_cur_thread(ThreadState *thr);
465 inline ThreadState *cur_thread() { in cur_thread()
466 return reinterpret_cast<ThreadState *>(cur_thread_placeholder)->current; in cur_thread()
469 ThreadState *thr = reinterpret_cast<ThreadState *>(cur_thread_placeholder); in cur_thread_init()
473 inline void set_cur_thread(ThreadState *thr) { in set_cur_thread()
[all …]
Dtsan_fd.h41 void FdAcquire(ThreadState *thr, uptr pc, int fd);
42 void FdRelease(ThreadState *thr, uptr pc, int fd);
43 void FdAccess(ThreadState *thr, uptr pc, int fd);
44 void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true);
45 void FdFileCreate(ThreadState *thr, uptr pc, int fd);
46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
47 void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd);
48 void FdEventCreate(ThreadState *thr, uptr pc, int fd);
49 void FdSignalCreate(ThreadState *thr, uptr pc, int fd);
50 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd);
[all …]
Dtsan_mman.h29 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz,
32 void user_free(ThreadState *thr, uptr pc, void *p, bool signal = true);
34 void *user_alloc(ThreadState *thr, uptr pc, uptr sz);
35 void *user_calloc(ThreadState *thr, uptr pc, uptr sz, uptr n);
36 void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz);
37 void *user_reallocarray(ThreadState *thr, uptr pc, void *p, uptr sz, uptr n);
38 void *user_memalign(ThreadState *thr, uptr pc, uptr align, uptr sz);
39 int user_posix_memalign(ThreadState *thr, uptr pc, void **memptr, uptr align,
41 void *user_aligned_alloc(ThreadState *thr, uptr pc, uptr align, uptr sz);
42 void *user_valloc(ThreadState *thr, uptr pc, uptr sz);
[all …]
Dtsan_rtl_thread.cpp42 ThreadState *caller_thr = static_cast<ThreadState *>(arg); in OnJoined()
48 ThreadState *thr;
76 ThreadState *thr1 = static_cast<ThreadState*>(arg); in OnDetached()
81 ThreadState *thr;
95 new(thr) ThreadState(ctx, tid, unique_id, epoch0, reuse_count, in OnStarted()
151 thr->~ThreadState(); in OnFinished()
198 static void ThreadCheckIgnore(ThreadState *thr) { in ThreadCheckIgnore()
207 static void ThreadCheckIgnore(ThreadState *thr) {} in ThreadCheckIgnore()
210 void ThreadFinalize(ThreadState *thr) { in ThreadFinalize()
228 int ThreadCount(ThreadState *thr) { in ThreadCount()
[all …]
Dtsan_platform_mac.cpp76 ALIGNED(64) static char main_thread_state[sizeof(ThreadState)];
77 static ThreadState *main_thread_state_loc = (ThreadState *)main_thread_state;
82 static ThreadState **cur_thread_location() { in cur_thread_location()
88 return (ThreadState **)MemToShadow(thread_identity); in cur_thread_location()
91 ThreadState *cur_thread() { in cur_thread()
92 return (ThreadState *)SignalSafeGetOrAllocate( in cur_thread()
93 (uptr *)cur_thread_location(), sizeof(ThreadState)); in cur_thread()
96 void set_cur_thread(ThreadState *thr) { in set_cur_thread()
104 ThreadState **thr_state_loc = cur_thread_location(); in cur_thread_finalize()
110 internal_munmap(*thr_state_loc, sizeof(ThreadState)); in cur_thread_finalize()
[all …]
Dtsan_mman.cpp86 ThreadState *thr = cur_thread(); in ScopedGlobalProcessor()
109 ThreadState *thr = cur_thread(); in ~ScopedGlobalProcessor()
146 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall()
161 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz, uptr align, in user_alloc_internal()
187 void user_free(ThreadState *thr, uptr pc, void *p, bool signal) { in user_free()
196 void *user_alloc(ThreadState *thr, uptr pc, uptr sz) { in user_alloc()
200 void *user_calloc(ThreadState *thr, uptr pc, uptr size, uptr n) { in user_calloc()
213 void *user_reallocarray(ThreadState *thr, uptr pc, void *p, uptr size, uptr n) { in user_reallocarray()
223 void OnUserAlloc(ThreadState *thr, uptr pc, uptr p, uptr sz, bool write) { in OnUserAlloc()
232 void OnUserFree(ThreadState *thr, uptr pc, uptr p, bool write) { in OnUserFree()
[all …]
Dtsan_fd.cpp49 static FdSync *allocsync(ThreadState *thr, uptr pc) { in allocsync()
62 static void unref(ThreadState *thr, uptr pc, FdSync *s) { in unref()
73 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc()
94 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, in init()
128 void FdOnFork(ThreadState *thr, uptr pc) { in FdOnFork()
160 void FdAcquire(ThreadState *thr, uptr pc, int fd) { in FdAcquire()
171 void FdRelease(ThreadState *thr, uptr pc, int fd) { in FdRelease()
182 void FdAccess(ThreadState *thr, uptr pc, int fd) { in FdAccess()
190 void FdClose(ThreadState *thr, uptr pc, int fd, bool write) { in FdClose()
218 void FdFileCreate(ThreadState *thr, uptr pc, int fd) { in FdFileCreate()
[all …]
Dtsan_rtl_mutex.cpp25 void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r);
28 ThreadState *thr;
31 Callback(ThreadState *thr, uptr pc) in Callback()
42 void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s) { in DDMutexInit()
48 static void ReportMutexMisuse(ThreadState *thr, uptr pc, ReportType typ, in ReportMutexMisuse()
64 void MutexCreate(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexCreate()
80 void MutexDestroy(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexDestroy()
142 void MutexPreLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexPreLock()
158 void MutexPostLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz, int rec) { in MutexPostLock()
213 int MutexUnlock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexUnlock()
[all …]
Dtsan_platform_linux.cpp430 void ImitateTlsWrite(ThreadState *thr, uptr tls_addr, uptr tls_size) { in ImitateTlsWrite()
466 static ThreadState *dead_thread_state = nullptr;
468 ThreadState *cur_thread() { in cur_thread()
469 ThreadState* thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread()
475 thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread()
477 thr = reinterpret_cast<ThreadState*>(MmapOrDie(sizeof(ThreadState), in cur_thread()
481 dead_thread_state = reinterpret_cast<ThreadState*>( in cur_thread()
482 MmapOrDie(sizeof(ThreadState), "ThreadState")); in cur_thread()
487 CHECK_EQ(0, internal_mprotect(dead_thread_state, sizeof(ThreadState), in cur_thread()
496 void set_cur_thread(ThreadState *thr) { in set_cur_thread()
[all …]
Dtsan_rtl.cpp49 THREADLOCAL char cur_thread_placeholder[sizeof(ThreadState)] ALIGNED(64);
112 ThreadState::ThreadState(Context *ctx, int tid, int unique_id, u64 epoch, in ThreadState() function in __tsan::ThreadState
244 void UnmapShadow(ThreadState *thr, uptr addr, uptr size) { in UnmapShadow()
354 void Initialize(ThreadState *thr) { in Initialize()
446 int Finalize(ThreadState *thr) { in Finalize()
499 void ForkBefore(ThreadState *thr, uptr pc) { in ForkBefore()
511 void ForkParentAfter(ThreadState *thr, uptr pc) { in ForkParentAfter()
517 void ForkChildAfter(ThreadState *thr, uptr pc) { in ForkChildAfter()
542 void GrowShadowStack(ThreadState *thr) { in GrowShadowStack()
555 u32 CurrentStackId(ThreadState *thr, uptr pc) { in CurrentStackId()
[all …]
/external/compiler-rt/lib/tsan/rtl/
Dtsan_rtl.h337 ThreadState *thr; // currently wired thread, or nullptr
359 struct ThreadState { struct
440 explicit ThreadState(Context *ctx, int tid, int unique_id, u64 epoch, argument
448 ThreadState *cur_thread();
453 INLINE ThreadState *cur_thread() { in cur_thread()
454 return reinterpret_cast<ThreadState *>(&cur_thread_placeholder); in cur_thread()
464 ThreadState *thr;
591 void ObtainCurrentStack(ThreadState *thr, uptr toppc, StackTraceTy *stack) { in ObtainCurrentStack()
607 void ALWAYS_INLINE StatInc(ThreadState *thr, StatType typ, u64 n = 1) {
612 void ALWAYS_INLINE StatSet(ThreadState *thr, StatType typ, u64 n) { in StatSet()
[all …]
Dtsan_fd.h42 void FdAcquire(ThreadState *thr, uptr pc, int fd);
43 void FdRelease(ThreadState *thr, uptr pc, int fd);
44 void FdAccess(ThreadState *thr, uptr pc, int fd);
45 void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true);
46 void FdFileCreate(ThreadState *thr, uptr pc, int fd);
47 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
48 void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd);
49 void FdEventCreate(ThreadState *thr, uptr pc, int fd);
50 void FdSignalCreate(ThreadState *thr, uptr pc, int fd);
51 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd);
[all …]
Dtsan_platform_mac.cc74 ALIGNED(64) static char main_thread_state[sizeof(ThreadState)];
76 ThreadState *cur_thread() { in cur_thread()
79 return (ThreadState *)&main_thread_state; in cur_thread()
81 ThreadState **fake_tls = (ThreadState **)MemToShadow(thread_identity); in cur_thread()
82 ThreadState *thr = (ThreadState *)SignalSafeGetOrAllocate( in cur_thread()
83 (uptr *)fake_tls, sizeof(ThreadState)); in cur_thread()
97 ThreadState **fake_tls = (ThreadState **)MemToShadow(thread_identity); in cur_thread_finalize()
98 internal_munmap(*fake_tls, sizeof(ThreadState)); in cur_thread_finalize()
136 ThreadState *thr = cur_thread(); in my_pthread_introspection_hook()
139 ThreadState *parent_thread_state = nullptr; // No parent. in my_pthread_introspection_hook()
[all …]
Dtsan_fd.cc50 static FdSync *allocsync(ThreadState *thr, uptr pc) { in allocsync()
63 static void unref(ThreadState *thr, uptr pc, FdSync *s) { in unref()
74 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc()
94 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, in init()
128 void FdOnFork(ThreadState *thr, uptr pc) { in FdOnFork()
160 void FdAcquire(ThreadState *thr, uptr pc, int fd) { in FdAcquire()
171 void FdRelease(ThreadState *thr, uptr pc, int fd) { in FdRelease()
182 void FdAccess(ThreadState *thr, uptr pc, int fd) { in FdAccess()
190 void FdClose(ThreadState *thr, uptr pc, int fd, bool write) { in FdClose()
218 void FdFileCreate(ThreadState *thr, uptr pc, int fd) { in FdFileCreate()
[all …]
Dtsan_rtl_thread.cc43 ThreadState *caller_thr = static_cast<ThreadState *>(arg); in OnJoined()
49 ThreadState *thr;
76 ThreadState *thr1 = static_cast<ThreadState*>(arg); in OnDetached()
81 ThreadState *thr;
95 new(thr) ThreadState(ctx, tid, unique_id, epoch0, reuse_count, in OnStarted()
138 thr->~ThreadState(); in OnFinished()
185 static void ThreadCheckIgnore(ThreadState *thr) { in ThreadCheckIgnore()
194 static void ThreadCheckIgnore(ThreadState *thr) {} in ThreadCheckIgnore()
197 void ThreadFinalize(ThreadState *thr) { in ThreadFinalize()
215 int ThreadCount(ThreadState *thr) { in ThreadCount()
[all …]
Dtsan_mman.cc83 ThreadState *thr = cur_thread(); in ScopedGlobalProcessor()
106 ThreadState *thr = cur_thread(); in ~ScopedGlobalProcessor()
135 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall()
149 void *user_alloc(ThreadState *thr, uptr pc, uptr sz, uptr align, bool signal) { in user_alloc()
162 void *user_calloc(ThreadState *thr, uptr pc, uptr size, uptr n) { in user_calloc()
171 void user_free(ThreadState *thr, uptr pc, void *p, bool signal) { in user_free()
180 void OnUserAlloc(ThreadState *thr, uptr pc, uptr p, uptr sz, bool write) { in OnUserAlloc()
189 void OnUserFree(ThreadState *thr, uptr pc, uptr p, bool write) { in OnUserFree()
197 void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz) { in user_realloc()
227 ThreadState *thr = cur_thread(); in invoke_malloc_hook()
[all …]
Dtsan_rtl_mutex.cc26 void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r);
29 ThreadState *thr;
32 Callback(ThreadState *thr, uptr pc) in Callback()
43 void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s) { in DDMutexInit()
49 static void ReportMutexMisuse(ThreadState *thr, uptr pc, ReportType typ, in ReportMutexMisuse()
65 void MutexCreate(ThreadState *thr, uptr pc, uptr addr, in MutexCreate()
84 void MutexDestroy(ThreadState *thr, uptr pc, uptr addr) { in MutexDestroy()
144 void MutexLock(ThreadState *thr, uptr pc, uptr addr, int rec, bool try_lock) { in MutexLock()
189 int MutexUnlock(ThreadState *thr, uptr pc, uptr addr, bool all) { in MutexUnlock()
232 void MutexReadLock(ThreadState *thr, uptr pc, uptr addr, bool trylock) { in MutexReadLock()
[all …]
Dtsan_platform_linux.cc353 static ThreadState *dead_thread_state = nullptr;
355 ThreadState *cur_thread() { in cur_thread()
356 ThreadState* thr = (ThreadState*)__get_tls()[TLS_SLOT_TSAN]; in cur_thread()
362 thr = reinterpret_cast<ThreadState*>(__get_tls()[TLS_SLOT_TSAN]); in cur_thread()
364 thr = reinterpret_cast<ThreadState*>(MmapOrDie(sizeof(ThreadState), in cur_thread()
368 dead_thread_state = reinterpret_cast<ThreadState*>( in cur_thread()
369 MmapOrDie(sizeof(ThreadState), "ThreadState")); in cur_thread()
374 CHECK_EQ(0, internal_mprotect(dead_thread_state, sizeof(ThreadState), in cur_thread()
388 ThreadState* thr = (ThreadState*)__get_tls()[TLS_SLOT_TSAN]; in cur_thread_finalize()
391 UnmapOrDie(thr, sizeof(ThreadState)); in cur_thread_finalize()
Dtsan_mman.h30 void *user_alloc(ThreadState *thr, uptr pc, uptr sz,
32 void *user_calloc(ThreadState *thr, uptr pc, uptr sz, uptr n);
34 void user_free(ThreadState *thr, uptr pc, void *p, bool signal = true);
35 void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz);
36 void *user_alloc_aligned(ThreadState *thr, uptr pc, uptr sz, uptr align);
/external/compiler-rt/lib/tsan/go/
Dtsan_go.cc113 static ThreadState *main_thr;
128 Processor *ThreadState::proc() { in proc()
134 static ThreadState *AllocGoroutine() { in AllocGoroutine()
135 ThreadState *thr = (ThreadState*)internal_alloc(MBlockThreadContex, in AllocGoroutine()
136 sizeof(ThreadState)); in AllocGoroutine()
141 void __tsan_init(ThreadState **thrp, Processor **procp, in __tsan_init()
144 ThreadState *thr = AllocGoroutine(); in __tsan_init()
153 ThreadState *thr = main_thr; in __tsan_fini()
162 void __tsan_read(ThreadState *thr, void *addr, void *pc) { in __tsan_read()
166 void __tsan_read_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) { in __tsan_read_pc()
[all …]
/external/llvm-project/compiler-rt/lib/tsan/go/
Dtsan_go.cpp123 static ThreadState *main_thr;
138 Processor *ThreadState::proc() { in proc()
144 static ThreadState *AllocGoroutine() { in AllocGoroutine()
145 ThreadState *thr = (ThreadState*)internal_alloc(MBlockThreadContex, in AllocGoroutine()
146 sizeof(ThreadState)); in AllocGoroutine()
151 void __tsan_init(ThreadState **thrp, Processor **procp, in __tsan_init()
154 ThreadState *thr = AllocGoroutine(); in __tsan_init()
163 ThreadState *thr = main_thr; in __tsan_fini()
172 void __tsan_read(ThreadState *thr, void *addr, void *pc) { in __tsan_read()
176 void __tsan_read_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) { in __tsan_read_pc()
[all …]
/external/llvm-project/compiler-rt/lib/scudo/standalone/
Dtsd_exclusive.h16 struct ThreadState { struct
42 if (LIKELY(State.InitState != ThreadState::NotInitialized)) in initThreadMaybe() argument
48 if (LIKELY(State.InitState == ThreadState::Initialized && in getTSDAndLock()
100 State.InitState = ThreadState::Initialized; in initThread()
109 static thread_local ThreadState State;
118 thread_local ThreadState TSDRegistryExT<Allocator>::State;
136 TSDRegistryT::State.InitState = ThreadState::TornDown; in teardownThread()
/external/scudo/standalone/
Dtsd_exclusive.h16 struct ThreadState { struct
56 if (LIKELY(State.InitState != ThreadState::NotInitialized)) in initThreadMaybe()
62 if (LIKELY(State.InitState == ThreadState::Initialized && in getTSDAndLock()
107 State.InitState = ThreadState::Initialized; in initThread()
116 static thread_local ThreadState State;
125 thread_local ThreadState TSDRegistryExT<Allocator>::State;
143 TSDRegistryT::State.InitState = ThreadState::TornDown; in teardownThread()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/src/internal/
DThreadContext.kt14 private class ThreadState(val context: CoroutineContext, n: Int) { class
43 fun (state: ThreadState, element: CoroutineContext.Element): ThreadState { in <anonymous>()
52 fun (state: ThreadState, element: CoroutineContext.Element): ThreadState { in <anonymous>()
72 context.fold(ThreadState(context, countOrElement), updateState) in threadContextElements()
86 oldState is ThreadState -> { in restoreThreadContext()
/external/llvm-project/compiler-rt/lib/tsan/tests/unit/
Dtsan_mman_test.cpp37 ThreadState *thr = cur_thread(); in TEST()
51 ThreadState *thr = cur_thread(); in TEST()
98 ThreadState *thr = cur_thread(); in TEST()
111 ThreadState *thr = cur_thread(); in TEST()
140 ThreadState *thr = cur_thread(); in TEST()
162 ThreadState *thr = cur_thread(); in TEST()
179 ThreadState *thr = cur_thread(); in TEST()
189 ThreadState *thr = cur_thread(); in TEST()

1234