Home
last modified time | relevance | path

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

12

/freebsd-13.1/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_rtl.h362 struct ThreadState { struct
378 ThreadState* current; argument
448 ThreadState *cur_thread();
455 inline ThreadState *cur_thread() { in cur_thread()
459 ThreadState *thr = reinterpret_cast<ThreadState *>(cur_thread_placeholder); in cur_thread_init()
474 ThreadState *thr;
692 int Finalize(ThreadState *thr);
746 void FuncExit(ThreadState *thr);
854 ThreadState *FiberCreate(ThreadState *thr, uptr pc, unsigned flags);
855 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_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 …]
H A Dtsan_rtl_thread.cpp42 ThreadState *caller_thr = static_cast<ThreadState *>(arg); in OnJoined()
48 ThreadState *thr;
74 ThreadState *thr1 = static_cast<ThreadState*>(arg); in OnDetached()
79 ThreadState *thr;
148 thr->~ThreadState(); in OnFinished()
222 int ThreadCount(ThreadState *thr) { in ThreadCount()
273 void ThreadFinish(ThreadState *thr) { in ThreadFinish()
416 void FiberSwitchImpl(ThreadState *from, ThreadState *to) { in FiberSwitchImpl()
423 ThreadState *FiberCreate(ThreadState *thr, uptr pc, unsigned flags) { in FiberCreate()
425 ThreadState *fiber = static_cast<ThreadState *>(mem); in FiberCreate()
[all …]
H A Dtsan_platform_mac.cpp77 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()
214 ThreadState *thr = cur_thread(); in my_pthread_introspection_hook()
[all …]
H A Dtsan_mman.cpp83 ThreadState *thr = cur_thread(); in ScopedGlobalProcessor()
106 ThreadState *thr = cur_thread(); in ~ScopedGlobalProcessor()
143 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall()
193 void *user_alloc(ThreadState *thr, uptr pc, uptr sz) { in user_alloc()
294 void *user_valloc(ThreadState *thr, uptr pc, uptr sz) { in user_valloc()
298 void *user_pvalloc(ThreadState *thr, uptr pc, uptr sz) { in user_pvalloc()
324 ThreadState *thr = cur_thread(); in invoke_malloc_hook()
332 ThreadState *thr = cur_thread(); in invoke_free_hook()
340 ThreadState *thr = cur_thread(); in internal_alloc()
349 ThreadState *thr = cur_thread(); in internal_free()
[all …]
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_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()
406 ThreadState *thr = reinterpret_cast<ThreadState*>(arg); in UpdateClockCallback()
416 void AcquireGlobal(ThreadState *thr, uptr pc) { in AcquireGlobal()
463 ThreadState *thr = reinterpret_cast<ThreadState*>(arg); in UpdateSleepClockCallback()
471 void AfterSleep(ThreadState *thr, uptr pc) { in AfterSleep()
482 void AcquireImpl(ThreadState *thr, uptr pc, SyncClock *c) { in AcquireImpl()
497 void ReleaseImpl(ThreadState *thr, uptr pc, SyncClock *c) { in ReleaseImpl()
[all …]
H A Dtsan_platform_linux.cpp450 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.cpp132 ThreadState::ThreadState(Context *ctx, u32 tid, int unique_id, u64 epoch, in ThreadState() function in __tsan::ThreadState
389 void Initialize(ThreadState *thr) { in Initialize()
480 int Finalize(ThreadState *thr) { in Finalize()
578 void GrowShadowStack(ThreadState *thr) { in GrowShadowStack()
591 u32 CurrentStackId(ThreadState *thr, uptr pc) { in CurrentStackId()
611 void TraceSwitch(ThreadState *thr) { in TraceSwitch()
631 uptr TraceTopPC(ThreadState *thr) { in TraceTopPC()
1037 void FuncEntry(ThreadState *thr, uptr pc) { in FuncEntry()
1058 void FuncExit(ThreadState *thr) { in FuncExit()
1083 void ThreadIgnoreEnd(ThreadState *thr, uptr pc) { in ThreadIgnoreEnd()
[all …]
H A Dtsan_interface_atomic.cpp222 static T AtomicLoad(ThreadState *thr, uptr pc, const volatile T *a, in AtomicLoad()
259 static void AtomicStore(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicStore()
282 static T AtomicRMW(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicRMW()
364 static T AtomicFetchOr(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicFetchOr()
449 static T AtomicCAS(ThreadState *thr, uptr pc, in AtomicCAS()
460 static void AtomicFence(ThreadState *thr, uptr pc, morder mo) { in AtomicFence()
489 ThreadState *const thr = cur_thread(); \
503 ScopedAtomic(ThreadState *thr, uptr pc, const volatile void *a, in ScopedAtomic()
514 ThreadState *thr_;
935 ThreadState *thr, uptr cpc, uptr pc, u8 *a) { in __tsan_go_atomic32_compare_exchange()
[all …]
H A Dtsan_sync.h67 void Init(ThreadState *thr, uptr pc, uptr addr, u64 uid);
112 void AllocBlock(ThreadState *thr, uptr pc, uptr p, uptr sz);
118 SyncVar* GetOrCreateAndLock(ThreadState *thr, uptr pc,
136 SyncVar* GetAndLock(ThreadState *thr, uptr pc, uptr addr, bool write_lock,
H A Dtsan_interface.h218 struct ThreadState;
398 void __tsan_go_atomic32_load(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
400 void __tsan_go_atomic64_load(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
402 void __tsan_go_atomic32_store(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
404 void __tsan_go_atomic64_store(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
406 void __tsan_go_atomic32_fetch_add(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
408 void __tsan_go_atomic64_fetch_add(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
410 void __tsan_go_atomic32_exchange(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
412 void __tsan_go_atomic64_exchange(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
414 void __tsan_go_atomic32_compare_exchange(ThreadState *thr, uptr cpc, uptr pc,
[all …]
H A Dtsan_interceptors.h11 ScopedInterceptor(ThreadState *thr, const char *fname, uptr pc);
16 ThreadState *const thr_;
35 ThreadState *thr = cur_thread(); \
H A Dtsan_sync.cpp19 void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s);
23 void SyncVar::Init(ThreadState *thr, uptr pc, uptr addr, u64 uid) { in Init()
58 void MetaMap::AllocBlock(ThreadState *thr, uptr pc, uptr p, uptr sz) { in AllocBlock()
193 SyncVar* MetaMap::GetOrCreateAndLock(ThreadState *thr, uptr pc, in GetOrCreateAndLock()
202 SyncVar *MetaMap::GetAndLock(ThreadState *thr, uptr pc, uptr addr, bool write_lock, in GetAndLock()
H A Dtsan_interface.cpp137 FiberDestroy(cur_thread(), CALLERPC, static_cast<ThreadState *>(fiber)); in __tsan_destroy_fiber()
142 FiberSwitch(cur_thread(), CALLERPC, static_cast<ThreadState *>(fiber), flags); in __tsan_switch_to_fiber()
147 ThreadSetName(static_cast<ThreadState *>(fiber), name); in __tsan_set_fiber_name()
H A Dtsan_external.cpp46 void InsertShadowStackFrameForTag(ThreadState *thr, uptr tag) { in InsertShadowStackFrameForTag()
60 typedef void(*AccessFunc)(ThreadState *, uptr, uptr, int);
63 ThreadState *thr = cur_thread(); in ExternalAccess()
H A Dtsan_rtl_proc.cpp46 void ProcWire(Processor *proc, ThreadState *thr) { in ProcWire()
53 void ProcUnwire(Processor *proc, ThreadState *thr) { in ProcUnwire()
H A Dtsan_interceptors_posix.cpp349 ThreadState *thr;
458 ThreadState *thr = cur_thread(); in on_exit_wrapper()
906 ThreadState *thr = cur_thread(); in DestroyThreadState()
1143 ThreadState *thr;
2040 ThreadState *thr = cur_thread(); in rtl_generic_sighandler()
2165 ThreadState *thr = cur_thread(); in atfork_prepare()
2173 ThreadState *thr = cur_thread(); in atfork_parent()
2181 ThreadState *thr = cur_thread(); in atfork_child()
2208 ThreadState *thr;
2257 ThreadState *thr;
[all …]
H A Dtsan_symbolize.cpp25 ThreadState *thr = cur_thread(); in EnterSymbolizer()
32 ThreadState *thr = cur_thread(); in ExitSymbolizer()
H A Dtsan_rtl_report.cpp128 bool ShouldReport(ThreadState *thr, ReportType typ) { in ShouldReport()
247 ThreadState *thr = tctx->thr; in IsInStackOrTls()
260 ThreadState *thr = tctx->thr; in IsThreadStackOrTls()
463 static bool HandleRacyStacks(ThreadState *thr, VarSizeStackTrace traces[2]) { in HandleRacyStacks()
494 static bool HandleRacyAddress(ThreadState *thr, uptr addr_min, uptr addr_max) { in HandleRacyAddress()
510 bool OutputReport(ThreadState *thr, const ScopedReport &srep) { in OutputReport()
585 static bool RaceBetweenAtomicAndFree(ThreadState *thr) { in RaceBetweenAtomicAndFree()
598 void ReportRace(ThreadState *thr) { in ReportRace()
725 void PrintCurrentStack(ThreadState *thr, uptr pc) { in PrintCurrentStack()
H A Dtsan_interface_inl.h88 ThreadState *thr = cur_thread(); in __tsan_vptr_update()
97 ThreadState *thr = cur_thread(); in __tsan_vptr_read()
/freebsd-13.1/contrib/llvm-project/compiler-rt/lib/tsan/go/
H A 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()
154 ThreadState *thr = AllocGoroutine(); in __tsan_init()
163 ThreadState *thr = main_thr; in __tsan_fini()
208 void __tsan_func_exit(ThreadState *thr) { in __tsan_func_exit()
223 void __tsan_go_start(ThreadState *parent, ThreadState **pthr, void *pc) { in __tsan_go_start()
224 ThreadState *thr = AllocGoroutine(); in __tsan_go_start()
[all …]
/freebsd-13.1/contrib/llvm-project/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()
/freebsd-13.1/contrib/llvm-project/compiler-rt/lib/scudo/
H A Dscudo_tsd_exclusive.inc19 enum ThreadState : u8 {
25 tls_model("initial-exec"))) extern THREADLOCAL ThreadState ScudoThreadState;

12