Home
last modified time | relevance | path

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

12

/freebsd-14.2/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_rtl.h143 ThreadState *thr;
159 struct ThreadState { struct
174 ThreadState* current; argument
241 ThreadState *cur_thread();
252 ThreadState *thr = reinterpret_cast<ThreadState *>(cur_thread_placeholder); in cur_thread_init()
268 ThreadState *thr;
618 ThreadState *FiberCreate(ThreadState *thr, uptr pc, unsigned flags);
619 void FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber);
620 void FiberSwitch(ThreadState *thr, uptr pc, ThreadState *fiber, unsigned flags);
651 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.cpp56 static FdSync *allocsync(ThreadState *thr, uptr pc) { in allocsync()
69 static void unref(ThreadState *thr, uptr pc, FdSync *s) { in unref()
80 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc()
145 void FdOnFork(ThreadState *thr, uptr pc) { in FdOnFork()
178 void FdAcquire(ThreadState *thr, uptr pc, int fd) { in FdAcquire()
189 void FdRelease(ThreadState *thr, uptr pc, int fd) { in FdRelease()
202 void FdAccess(ThreadState *thr, uptr pc, int fd) { in FdAccess()
253 void FdFileCreate(ThreadState *thr, uptr pc, int fd) { in FdFileCreate()
279 void FdEventCreate(ThreadState *thr, uptr pc, int fd) { in FdEventCreate()
286 void FdSignalCreate(ThreadState *thr, uptr pc, int fd) { in FdSignalCreate()
[all …]
H A Dtsan_mman.cpp88 ThreadState *thr = cur_thread(); in ScopedGlobalProcessor()
111 ThreadState *thr = cur_thread(); in ~ScopedGlobalProcessor()
166 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall()
222 void *user_alloc(ThreadState *thr, uptr pc, uptr sz) { in user_alloc()
339 void *user_valloc(ThreadState *thr, uptr pc, uptr sz) { in user_valloc()
343 void *user_pvalloc(ThreadState *thr, uptr pc, uptr sz) { in user_pvalloc()
394 ThreadState *thr = cur_thread(); in invoke_malloc_hook()
401 ThreadState *thr = cur_thread(); in invoke_free_hook()
408 ThreadState *thr = cur_thread(); in Alloc()
418 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_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 …]
H A Dtsan_platform_linux.cpp546 void ImitateTlsWrite(ThreadState *thr, uptr tls_addr, uptr tls_size) { in ImitateTlsWrite()
583 static ThreadState *dead_thread_state = nullptr;
585 ThreadState *cur_thread() { in cur_thread()
586 ThreadState* thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread()
592 thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread()
594 thr = reinterpret_cast<ThreadState*>(MmapOrDie(sizeof(ThreadState), in cur_thread()
598 dead_thread_state = reinterpret_cast<ThreadState*>( in cur_thread()
599 MmapOrDie(sizeof(ThreadState), "ThreadState")); in cur_thread()
613 void set_cur_thread(ThreadState *thr) { in set_cur_thread()
622 ThreadState* thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread_finalize()
[all …]
H A Dtsan_rtl.cpp295 void SlotAttachAndLock(ThreadState* thr) { in SlotAttachAndLock()
351 void SlotDetach(ThreadState* thr) { in SlotDetach()
376 void SlotUnlock(ThreadState* thr) { in SlotUnlock()
406 ThreadState::ThreadState(Tid tid) in ThreadState() function in __tsan::ThreadState
669 ThreadState* thr = cur_thread(); in CheckUnwind()
680 void Initialize(ThreadState *thr) { in Initialize()
767 int Finalize(ThreadState *thr) { in Finalize()
875 void GrowShadowStack(ThreadState *thr) { in GrowShadowStack()
940 void TraceSwitchPart(ThreadState* thr) { in TraceSwitchPart()
1044 void ThreadIgnoreEnd(ThreadState *thr) { in ThreadIgnoreEnd()
[all …]
H A Dtsan_interface_atomic.cpp262 static void AtomicStore(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicStore()
342 static T AtomicExchange(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicExchange()
348 static T AtomicFetchAdd(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicFetchAdd()
354 static T AtomicFetchSub(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicFetchSub()
360 static T AtomicFetchAnd(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicFetchAnd()
366 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(); \
933 ThreadState *thr, uptr cpc, uptr pc, u8 *a) { in __tsan_go_atomic32_compare_exchange()
[all …]
H A Dtsan_interface.h230 struct ThreadState;
410 void __tsan_go_atomic32_load(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
412 void __tsan_go_atomic64_load(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
414 void __tsan_go_atomic32_store(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
416 void __tsan_go_atomic64_store(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
426 void __tsan_go_atomic32_fetch_or(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
428 void __tsan_go_atomic64_fetch_or(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
430 void __tsan_go_atomic32_exchange(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
432 void __tsan_go_atomic64_exchange(ThreadState *thr, uptr cpc, uptr pc, u8 *a);
434 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);
23 ThreadState *const thr_;
33 ThreadState *thr;
45 inline bool MustIgnoreInterceptor(ThreadState *thr) { in MustIgnoreInterceptor()
52 ThreadState *thr = cur_thread_init(); \
H A Dtsan_sync.h67 void Init(ThreadState *thr, uptr pc, uptr addr, bool save_stack);
97 void AllocBlock(ThreadState *thr, uptr pc, uptr p, uptr sz);
114 SyncVar *GetSyncOrCreate(ThreadState *thr, uptr pc, uptr addr, in GetSyncOrCreate()
142 SyncVar *GetSync(ThreadState *thr, uptr pc, uptr addr, bool create,
H A Dtsan_interceptors_posix.cpp380 ThreadState *thr;
424 ThreadState *thr = cur_thread(); in at_exit_callback_installed_at()
433 ThreadState *thr = cur_thread(); in cxa_at_exit_callback_installed_at()
499 ThreadState *thr = cur_thread(); in on_exit_callback_installed_at()
947 ThreadState *thr = cur_thread(); in DestroyThreadState()
1185 ThreadState *thr;
2283 ThreadState *thr = cur_thread(); in atfork_prepare()
2291 ThreadState *thr = cur_thread(); in atfork_parent()
2299 ThreadState *thr = cur_thread(); in atfork_child()
2359 ThreadState *thr;
[all …]
H A Dtsan_external.cpp62 static void PushTag(ThreadState *thr, uptr tag) { in PushTag()
65 static void PopTag(ThreadState *thr) { FuncExit(thr); } in PopTag()
74 ThreadState *thr = cur_thread(); in ExternalAccess()
H A Dtsan_rtl_proc.cpp45 void ProcWire(Processor *proc, ThreadState *thr) { in ProcWire()
52 void ProcUnwire(Processor *proc, ThreadState *thr) { in ProcUnwire()
H A Dtsan_sync.cpp19 void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s);
23 void SyncVar::Init(ThreadState *thr, uptr pc, uptr addr, bool save_stack) { in Init()
47 void MetaMap::AllocBlock(ThreadState *thr, uptr pc, uptr p, uptr sz) { in AllocBlock()
204 SyncVar *MetaMap::GetSync(ThreadState *thr, uptr pc, uptr addr, bool create, in GetSync()
H A Dtsan_symbolize.cpp25 ThreadState *thr = cur_thread(); in EnterSymbolizer()
32 ThreadState *thr = cur_thread(); in ExitSymbolizer()
H A Dtsan_interface_ann.cpp32 ScopedAnnotation(ThreadState *thr, const char *aname, uptr pc) in ScopedAnnotation()
43 ThreadState *const thr_;
49 ThreadState *thr = cur_thread(); \
439 static void ReportMutexHeldWrongContext(ThreadState *thr, uptr pc) { in ReportMutexHeldWrongContext()
H A Dtsan_rtl_report.cpp130 bool ShouldReport(ThreadState *thr, ReportType typ) { in ShouldReport()
237 ThreadState *thr = tctx->thr; in IsInStackOrTls()
250 ThreadState *thr = tctx->thr; in IsThreadStackOrTls()
613 static bool HandleRacyStacks(ThreadState *thr, VarSizeStackTrace traces[2]) { in HandleRacyStacks()
631 bool OutputReport(ThreadState *thr, const ScopedReport &srep) { in OutputReport()
708 void ReportRace(ThreadState *thr, RawShadow *shadow_mem, Shadow cur, Shadow old, in ReportRace()
825 void PrintCurrentStack(ThreadState *thr, uptr pc) { in PrintCurrentStack()
/freebsd-14.2/contrib/llvm-project/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 …]
/freebsd-14.2/contrib/llvm-project/compiler-rt/lib/scudo/standalone/
H A Dtsd_exclusive.h18 struct ThreadState { struct
72 if (LIKELY(State.InitState != ThreadState::NotInitialized)) in initThreadMaybe()
84 if (LIKELY(State.InitState == ThreadState::Initialized && in getTSDAndLock()
136 State.InitState = ThreadState::Initialized; in initThread()
145 static thread_local ThreadState State;
154 thread_local ThreadState TSDRegistryExT<Allocator>::State;
173 TSDRegistryT::State.InitState = ThreadState::TornDown; in teardownThread()

12