Home
last modified time | relevance | path

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

123

/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl/
H A Dtsan_rtl.h142 ThreadState *thr;
158 struct ThreadState { struct
173 ThreadState* current; argument
239 ThreadState *cur_thread();
250 ThreadState *thr = reinterpret_cast<ThreadState *>(cur_thread_placeholder); in cur_thread_init()
266 ThreadState *thr;
615 ThreadState *FiberCreate(ThreadState *thr, uptr pc, unsigned flags);
616 void FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber);
617 void FiberSwitch(ThreadState *thr, uptr pc, ThreadState *fiber, unsigned flags);
641 ThreadState *thr_;
[all …]
H A 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);
45 void FdFileCreate(ThreadState *thr, uptr pc, int fd);
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);
51 void FdPollCreate(ThreadState *thr, uptr pc, int fd);
53 void FdSocketCreate(ThreadState *thr, uptr pc, int fd);
56 void FdSocketConnect(ThreadState *thr, uptr pc, int fd);
[all …]
H A Dtsan_platform_mac.cpp51 static ThreadState *dead_thread_state;
77 auto dts = (ThreadState *)MmapOrDie(sizeof(ThreadState), "ThreadState"); in InitializeThreadStateStorage()
87 ThreadState *cur_thread() { in cur_thread()
91 return (ThreadState *)main_thread_state; in cur_thread()
96 ThreadState *thr = (ThreadState *)pthread_getspecific(thread_state_key); in cur_thread()
98 thr = (ThreadState *)MmapOrDie(sizeof(ThreadState), "ThreadState"); in cur_thread()
105 void set_cur_thread(ThreadState *thr) { in set_cur_thread()
111 ThreadState *thr = (ThreadState *)pthread_getspecific(thread_state_key); in cur_thread_finalize()
125 UnmapOrDie(thr, sizeof(ThreadState)); in cur_thread_finalize()
207 ThreadState *thr = cur_thread(); in ThreadCreateCallback()
[all …]
H A Dtsan_rtl_thread.cpp86 void ThreadFinalize(ThreadState *thr) { in ThreadFinalize()
104 int ThreadCount(ThreadState *thr) { in ThreadCount()
145 ThreadState *thr;
203 thr = static_cast<ThreadState *>(arg); in OnStarted()
205 new (thr) ThreadState(tid); in OnStarted()
214 void ThreadFinish(ThreadState *thr) { in ThreadFinish()
250 thr->~ThreadState(); in ThreadFinish()
333 void FiberSwitchImpl(ThreadState *from, ThreadState *to) { in FiberSwitchImpl()
340 ThreadState *FiberCreate(ThreadState *thr, uptr pc, unsigned flags) { in FiberCreate()
342 ThreadState *fiber = static_cast<ThreadState *>(mem); in FiberCreate()
[all …]
H A Dtsan_mman.h33 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz,
36 void user_free(ThreadState *thr, uptr pc, void *p, bool signal = true);
38 void *user_alloc(ThreadState *thr, uptr pc, uptr sz);
39 void *user_calloc(ThreadState *thr, uptr pc, uptr sz, uptr n);
40 void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz);
41 void *user_reallocarray(ThreadState *thr, uptr pc, void *p, uptr sz, uptr n);
42 void *user_memalign(ThreadState *thr, uptr pc, uptr align, uptr sz);
43 int user_posix_memalign(ThreadState *thr, uptr pc, void **memptr, uptr align,
45 void *user_aligned_alloc(ThreadState *thr, uptr pc, uptr align, uptr sz);
46 void *user_valloc(ThreadState *thr, uptr pc, uptr sz);
[all …]
H A Dtsan_fd.cpp55 static FdSync *allocsync(ThreadState *thr, uptr pc) { in allocsync()
68 static void unref(ThreadState *thr, uptr pc, FdSync *s) { in unref()
79 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc()
143 void FdOnFork(ThreadState *thr, uptr pc) { in FdOnFork()
175 void FdAcquire(ThreadState *thr, uptr pc, int fd) { in FdAcquire()
186 void FdRelease(ThreadState *thr, uptr pc, int fd) { in FdRelease()
199 void FdAccess(ThreadState *thr, uptr pc, int fd) { in FdAccess()
249 void FdFileCreate(ThreadState *thr, uptr pc, int fd) { in FdFileCreate()
275 void FdEventCreate(ThreadState *thr, uptr pc, int fd) { in FdEventCreate()
282 void FdSignalCreate(ThreadState *thr, uptr pc, int fd) { in FdSignalCreate()
[all …]
H A Dtsan_mman.cpp85 ThreadState *thr = cur_thread(); in ScopedGlobalProcessor()
108 ThreadState *thr = cur_thread(); in ~ScopedGlobalProcessor()
163 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall()
219 void *user_alloc(ThreadState *thr, uptr pc, uptr sz) { in user_alloc()
336 void *user_valloc(ThreadState *thr, uptr pc, uptr sz) { in user_valloc()
340 void *user_pvalloc(ThreadState *thr, uptr pc, uptr sz) { in user_pvalloc()
366 ThreadState *thr = cur_thread(); in invoke_malloc_hook()
373 ThreadState *thr = cur_thread(); in invoke_free_hook()
380 ThreadState *thr = cur_thread(); in Alloc()
390 ThreadState *thr = cur_thread(); in FreeImpl()
[all …]
H A Dtsan_interface.cpp31 ThreadState *thr = cur_thread(); in __tsan_read16_pc()
38 ThreadState *thr = cur_thread(); in __tsan_write16_pc()
47 ThreadState *thr = cur_thread(); in __tsan_unaligned_read16()
54 ThreadState *thr = cur_thread(); in __tsan_unaligned_write16()
72 FiberDestroy(cur_thread(), CALLERPC, static_cast<ThreadState *>(fiber)); in __tsan_destroy_fiber()
77 FiberSwitch(cur_thread(), CALLERPC, static_cast<ThreadState *>(fiber), flags); in __tsan_switch_to_fiber()
82 ThreadSetName(static_cast<ThreadState *>(fiber), name); in __tsan_set_fiber_name()
H A Dtsan_rtl_mutex.cpp25 void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r);
26 void ReportDestroyLocked(ThreadState *thr, uptr pc, uptr addr,
30 ThreadState *thr;
33 Callback(ThreadState *thr, uptr pc) in Callback()
44 void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s) { in DDMutexInit()
419 void MutexRepair(ThreadState *thr, uptr pc, uptr addr) { in MutexRepair()
441 void Acquire(ThreadState *thr, uptr pc, uptr addr) { in Acquire()
455 void AcquireGlobal(ThreadState *thr) { in AcquireGlobal()
463 void Release(ThreadState *thr, uptr pc, uptr addr) { in Release()
502 void IncrementEpoch(ThreadState *thr) { in IncrementEpoch()
[all …]
H A Dtsan_platform_linux.cpp449 void ImitateTlsWrite(ThreadState *thr, uptr tls_addr, uptr tls_size) { in ImitateTlsWrite()
486 static ThreadState *dead_thread_state = nullptr;
488 ThreadState *cur_thread() { in cur_thread()
489 ThreadState* thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread()
495 thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread()
497 thr = reinterpret_cast<ThreadState*>(MmapOrDie(sizeof(ThreadState), in cur_thread()
501 dead_thread_state = reinterpret_cast<ThreadState*>( in cur_thread()
502 MmapOrDie(sizeof(ThreadState), "ThreadState")); in cur_thread()
516 void set_cur_thread(ThreadState *thr) { in set_cur_thread()
525 ThreadState* thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread_finalize()
[all …]
H A Dtsan_rtl_access.cpp18 ALWAYS_INLINE USED bool TryTraceMemoryAccess(ThreadState* thr, uptr pc, in TryTraceMemoryAccess()
87 void TraceFunc(ThreadState* thr, uptr pc) { in TraceFunc()
95 NOINLINE void TraceRestartFuncEntry(ThreadState* thr, uptr pc) { in TraceRestartFuncEntry()
100 NOINLINE void TraceRestartFuncExit(ThreadState* thr) { in TraceRestartFuncExit()
105 void TraceMutexLock(ThreadState* thr, EventType type, uptr pc, uptr addr, in TraceMutexLock()
122 void TraceMutexUnlock(ThreadState* thr, uptr addr) { in TraceMutexUnlock()
134 void TraceTime(ThreadState* thr) { in TraceTime()
195 bool CheckRaces(ThreadState* thr, RawShadow* shadow_mem, Shadow cur, in CheckRaces()
305 bool CheckRaces(ThreadState* thr, RawShadow* shadow_mem, Shadow cur, in CheckRaces()
448 void RestartMemoryAccess16(ThreadState* thr, uptr pc, uptr addr, in RestartMemoryAccess16()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl-old/
H A Dtsan_rtl.h134 struct ThreadState { struct
150 ThreadState* current; argument
226 ThreadState *cur_thread();
233 inline ThreadState *cur_thread() { in cur_thread()
237 ThreadState *thr = reinterpret_cast<ThreadState *>(cur_thread_placeholder); in cur_thread_init()
253 ThreadState *thr;
466 int Finalize(ThreadState *thr);
530 void FuncExit(ThreadState *thr);
641 ThreadState *FiberCreate(ThreadState *thr, uptr pc, unsigned flags);
642 void FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber);
[all …]
H A 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);
45 void FdFileCreate(ThreadState *thr, uptr pc, int fd);
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);
51 void FdPollCreate(ThreadState *thr, uptr pc, int fd);
52 void FdSocketCreate(ThreadState *thr, uptr pc, int fd);
55 void FdSocketConnect(ThreadState *thr, uptr pc, int fd);
[all …]
H A Dtsan_rtl_thread.cpp108 int ThreadCount(ThreadState *thr) { in ThreadCount()
115 ThreadState *thr;
144 ThreadState *thr;
223 void ThreadFinish(ThreadState *thr) { in ThreadFinish()
264 thr->~ThreadState(); in OnFinished()
285 ThreadState *caller_thr = static_cast<ThreadState *>(arg); in OnJoined()
299 ThreadState *thr1 = static_cast<ThreadState *>(arg); in OnDetached()
314 void FiberSwitchImpl(ThreadState *from, ThreadState *to) { in FiberSwitchImpl()
321 ThreadState *FiberCreate(ThreadState *thr, uptr pc, unsigned flags) { in FiberCreate()
323 ThreadState *fiber = static_cast<ThreadState *>(mem); in FiberCreate()
[all …]
H A Dtsan_platform_mac.cpp51 static ThreadState *dead_thread_state;
77 auto dts = (ThreadState *)MmapOrDie(sizeof(ThreadState), "ThreadState"); in InitializeThreadStateStorage()
87 ThreadState *cur_thread() { in cur_thread()
91 return (ThreadState *)main_thread_state; in cur_thread()
96 ThreadState *thr = (ThreadState *)pthread_getspecific(thread_state_key); in cur_thread()
98 thr = (ThreadState *)MmapOrDie(sizeof(ThreadState), "ThreadState"); in cur_thread()
105 void set_cur_thread(ThreadState *thr) { in set_cur_thread()
111 ThreadState *thr = (ThreadState *)pthread_getspecific(thread_state_key); in cur_thread_finalize()
125 UnmapOrDie(thr, sizeof(ThreadState)); in cur_thread_finalize()
230 ThreadState *thr = cur_thread(); in my_pthread_introspection_hook()
[all …]
H A Dtsan_mman.h31 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz,
34 void user_free(ThreadState *thr, uptr pc, void *p, bool signal = true);
36 void *user_alloc(ThreadState *thr, uptr pc, uptr sz);
37 void *user_calloc(ThreadState *thr, uptr pc, uptr sz, uptr n);
38 void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz);
39 void *user_reallocarray(ThreadState *thr, uptr pc, void *p, uptr sz, uptr n);
40 void *user_memalign(ThreadState *thr, uptr pc, uptr align, uptr sz);
41 int user_posix_memalign(ThreadState *thr, uptr pc, void **memptr, uptr align,
43 void *user_aligned_alloc(ThreadState *thr, uptr pc, uptr align, uptr sz);
44 void *user_valloc(ThreadState *thr, uptr pc, uptr sz);
[all …]
H A Dtsan_interface.cpp31 ThreadState *thr = cur_thread(); in __tsan_read16()
38 ThreadState *thr = cur_thread(); in __tsan_write16()
45 ThreadState *thr = cur_thread(); in __tsan_read16_pc()
52 ThreadState *thr = cur_thread(); in __tsan_write16_pc()
61 ThreadState *thr = cur_thread(); in __tsan_unaligned_read16()
68 ThreadState *thr = cur_thread(); in __tsan_unaligned_write16()
86 FiberDestroy(cur_thread(), CALLERPC, static_cast<ThreadState *>(fiber)); in __tsan_destroy_fiber()
91 FiberSwitch(cur_thread(), CALLERPC, static_cast<ThreadState *>(fiber), flags); in __tsan_switch_to_fiber()
96 ThreadSetName(static_cast<ThreadState *>(fiber), name); in __tsan_set_fiber_name()
H A 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()
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()
218 void FdFileCreate(ThreadState *thr, uptr pc, int fd) { in FdFileCreate()
244 void FdEventCreate(ThreadState *thr, uptr pc, int fd) { in FdEventCreate()
251 void FdSignalCreate(ThreadState *thr, uptr pc, int fd) { in FdSignalCreate()
[all …]
H A Dtsan_mman.cpp85 ThreadState *thr = cur_thread(); in ScopedGlobalProcessor()
108 ThreadState *thr = cur_thread(); in ~ScopedGlobalProcessor()
157 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall()
213 void *user_alloc(ThreadState *thr, uptr pc, uptr sz) { in user_alloc()
314 void *user_valloc(ThreadState *thr, uptr pc, uptr sz) { in user_valloc()
318 void *user_pvalloc(ThreadState *thr, uptr pc, uptr sz) { in user_pvalloc()
344 ThreadState *thr = cur_thread(); in invoke_malloc_hook()
351 ThreadState *thr = cur_thread(); in invoke_free_hook()
358 ThreadState *thr = cur_thread(); in Alloc()
368 ThreadState *thr = cur_thread(); in FreeImpl()
[all …]
H A 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()
389 void MutexRepair(ThreadState *thr, uptr pc, uptr addr) { in MutexRepair()
403 void Acquire(ThreadState *thr, uptr pc, uptr addr) { in Acquire()
415 ThreadState *thr = reinterpret_cast<ThreadState*>(arg); in UpdateClockCallback()
425 void AcquireGlobal(ThreadState *thr) { in AcquireGlobal()
445 void Release(ThreadState *thr, uptr pc, uptr addr) { in Release()
471 ThreadState *thr = reinterpret_cast<ThreadState*>(arg); in UpdateSleepClockCallback()
[all …]
H A Dtsan_platform_linux.cpp457 void ImitateTlsWrite(ThreadState *thr, uptr tls_addr, uptr tls_size) { in ImitateTlsWrite()
494 static ThreadState *dead_thread_state = nullptr;
496 ThreadState *cur_thread() { in cur_thread()
497 ThreadState* thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread()
503 thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread()
505 thr = reinterpret_cast<ThreadState*>(MmapOrDie(sizeof(ThreadState), in cur_thread()
509 dead_thread_state = reinterpret_cast<ThreadState*>( in cur_thread()
510 MmapOrDie(sizeof(ThreadState), "ThreadState")); in cur_thread()
524 void set_cur_thread(ThreadState *thr) { in set_cur_thread()
533 ThreadState* thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread_finalize()
[all …]
H A Dtsan_rtl.cpp126 ThreadState::ThreadState(Context *ctx, Tid tid, int unique_id, u64 epoch, in ThreadState() function in __tsan::ThreadState
396 void Initialize(ThreadState *thr) { in Initialize()
486 int Finalize(ThreadState *thr) { in Finalize()
546 void ForkParentAfter(ThreadState *thr, in ForkParentAfter()
588 void GrowShadowStack(ThreadState *thr) { in GrowShadowStack()
623 void TraceSwitchPart(ThreadState *thr) { in TraceSwitchPart()
685 void TraceSwitch(ThreadState *thr) { in TraceSwitch()
703 uptr TraceTopPC(ThreadState *thr) { in TraceTopPC()
738 void ThreadIgnoreEnd(ThreadState *thr) { in ThreadIgnoreEnd()
753 ThreadState *thr = cur_thread(); in __tsan_testonly_shadow_stack_current_size()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/tsan/go/
H A Dtsan_go.cpp121 static ThreadState *main_thr;
136 Processor *ThreadState::proc() { in proc()
142 static ThreadState *AllocGoroutine() { in AllocGoroutine()
143 auto *thr = (ThreadState *)Alloc(sizeof(ThreadState)); in AllocGoroutine()
151 ThreadState *thr = AllocGoroutine(); in __tsan_init()
160 ThreadState *thr = main_thr; in __tsan_fini()
205 void __tsan_func_exit(ThreadState *thr) { in __tsan_func_exit()
220 void __tsan_go_start(ThreadState *parent, ThreadState **pthr, void *pc) { in __tsan_go_start()
221 ThreadState *thr = AllocGoroutine(); in __tsan_go_start()
227 void __tsan_go_end(ThreadState *thr) { in __tsan_go_end()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/scudo/standalone/
H A Dtsd_exclusive.h16 struct ThreadState { struct
60 if (LIKELY(State.InitState != ThreadState::NotInitialized)) in initThreadMaybe()
66 if (LIKELY(State.InitState == ThreadState::Initialized && in getTSDAndLock()
111 State.InitState = ThreadState::Initialized; in initThread()
120 static thread_local ThreadState State;
129 thread_local ThreadState TSDRegistryExT<Allocator>::State;
147 TSDRegistryT::State.InitState = ThreadState::TornDown; in teardownThread()
/llvm-project-15.0.7/compiler-rt/lib/tsan/tests/unit/
H A 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()

123