Home
last modified time | relevance | path

Searched refs:thread_registry (Results 1 – 22 of 22) sorted by relevance

/llvm-project-15.0.7/compiler-rt/lib/lsan/
H A Dlsan_thread.cpp26 static ThreadRegistry *thread_registry; variable
35 thread_registry = in InitializeThreadRegistry()
48 return thread_registry->CreateThread(0, detached, parent_tid, arg); in ThreadCreate()
53 thread_registry->StartThread(tid, os_id, thread_type, arg); in ThreadStart()
58 thread_registry->FinishThread(GetCurrentThread()); in ThreadFinish()
63 if (!thread_registry) in CurrentThreadContext()
68 return (ThreadContext *)thread_registry->GetThreadLocked(GetCurrentThread()); in CurrentThreadContext()
81 void LockThreadRegistry() { thread_registry->Lock(); } in LockThreadRegistry()
83 void UnlockThreadRegistry() { thread_registry->Unlock(); } in UnlockThreadRegistry()
86 thread_registry->CheckLocked(); in GetThreadRegistryLocked()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl/
H A Dtsan_rtl_thread.cpp91 ThreadRegistryLock l(&ctx->thread_registry); in ThreadFinalize()
93 ctx->thread_registry.RunCallbackForEachThreadLocked(CollectThreadLeaks, in ThreadFinalize()
106 ctx->thread_registry.GetNumberOfThreads(0, 0, &result); in ThreadCount()
154 ctx->thread_registry.StartThread(tid, os_id, thread_type, thr); in ThreadStart()
229 ThreadRegistryLock lock(&ctx->thread_registry); in ThreadFinish()
249 ctx->thread_registry.FinishThread(thr->tid); in ThreadFinish()
285 return ctx->thread_registry.ConsumeThreadUserId(uid); in ThreadConsumeTid()
297 ctx->thread_registry.JoinThread(tid, &arg); in ThreadJoin()
318 ctx->thread_registry.DetachThread(tid, thr); in ThreadDetach()
325 ctx->thread_registry.SetThreadUserId(tid, uid); in ThreadNotJoined()
[all …]
H A Dtsan_rtl_report.cpp137 ThreadRegistryLock l(&ctx->thread_registry); in ShouldReport()
159 ctx->thread_registry.CheckLocked(); in ScopedReportBase()
227 ctx->thread_registry.CheckLocked(); in FindThreadByTidLocked()
229 ctx->thread_registry.GetThreadLocked(tid)); in FindThreadByTidLocked()
244 ctx->thread_registry.CheckLocked(); in IsThreadStackOrTls()
246 static_cast<ThreadContext *>(ctx->thread_registry.FindThreadContextLocked( in IsThreadStackOrTls()
443 ctx->thread_registry.CheckLocked(); in RestoreStack()
460 static_cast<ThreadContext *>(ctx->thread_registry.GetThreadLocked(tid)); in RestoreStack()
768 ThreadRegistryLock l0(&ctx->thread_registry); in ReportRace()
800 ctx->thread_registry.GetThreadLocked(tids[i])); in ReportRace()
[all …]
H A Dtsan_rtl.cpp136 ThreadRegistryLock lock0(&ctx->thread_registry); in DoResetImpl()
142 for (u32 i = ctx->thread_registry.NumThreadsLocked(); i--;) { in DoResetImpl()
143 ThreadContext* tctx = (ThreadContext*)ctx->thread_registry.GetThreadLocked( in DoResetImpl()
359 { ThreadRegistryLock lock(&ctx->thread_registry); } in SlotLock()
383 thread_registry([](Tid tid) -> ThreadContextBase* { in Context()
578 ThreadRegistryLock lock0(&ctx->thread_registry); in MapShadow()
810 ctx->thread_registry.Lock(); in ForkBefore()
838 ctx->thread_registry.Unlock(); in ForkAfter()
849 u32 nthread = ctx->thread_registry.OnFork(thr->tid); in ForkChildAfter()
H A Dtsan_debugging.cpp218 ctx->thread_registry.Lock(); in __tsan_locate_address()
220 ctx->thread_registry.Unlock(); in __tsan_locate_address()
255 ThreadContextBase *tctx = ctx->thread_registry.GetThreadLocked(b->tid); in __tsan_get_alloc_stack()
H A Dtsan_rtl_mutex.cpp58 ThreadRegistryLock l(&ctx->thread_registry); in ReportMutexMisuse()
531 ThreadRegistryLock l(&ctx->thread_registry); in ReportDeadlock()
559 ThreadRegistryLock l0(&ctx->thread_registry); in ReportDestroyLocked()
H A Dtsan_platform_mac.cpp173 ctx->thread_registry.GetNumberOfThreads(&nthread, &nlive); in WriteMemoryProfile()
H A Dtsan_platform_linux.cpp125 ctx->thread_registry.GetNumberOfThreads(&nthread, &nlive); in WriteMemoryProfile()
H A Dtsan_mman.cpp171 ThreadRegistryLock l(&ctx->thread_registry); in SignalUnsafeCall()
H A Dtsan_rtl.h315 ThreadRegistry thread_registry; member
H A Dtsan_interceptors_posix.cpp1975 ThreadRegistryLock l(&ctx->thread_registry); in ReportErrnoSpoiling()
2429 __tsan::ctx->thread_registry.SetThreadNameByUserId(thread, name)
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl-old/
H A Dtsan_rtl_thread.cpp95 ThreadRegistryLock l(&ctx->thread_registry); in ThreadFinalize()
97 ctx->thread_registry.RunCallbackForEachThreadLocked(CollectThreadLeaks, in ThreadFinalize()
110 ctx->thread_registry.GetNumberOfThreads(0, 0, &result); in ThreadCount()
122 Tid tid = ctx->thread_registry.CreateThread(uid, detached, parent_tid, &args); in ThreadCreate()
163 ThreadRegistry *tr = &ctx->thread_registry; in ThreadStart()
234 ctx->thread_registry.FinishThread(thr->tid); in ThreadFinish()
274 return ctx->thread_registry.ConsumeThreadUserId(uid); in ThreadConsumeTid()
281 ctx->thread_registry.JoinThread(tid, thr); in ThreadJoin()
295 ctx->thread_registry.DetachThread(tid, thr); in ThreadDetach()
306 ctx->thread_registry.SetThreadUserId(tid, uid); in ThreadNotJoined()
[all …]
H A Dtsan_rtl_report.cpp137 ThreadRegistryLock l(&ctx->thread_registry); in ShouldReport()
159 ctx->thread_registry.CheckLocked(); in ScopedReportBase()
228 ctx->thread_registry.CheckLocked(); in FindThreadByUidLocked()
230 ctx->thread_registry.FindThreadContextLocked( in FindThreadByUidLocked()
235 ctx->thread_registry.CheckLocked(); in FindThreadByTidLocked()
237 ctx->thread_registry.GetThreadLocked(tid)); in FindThreadByTidLocked()
252 ctx->thread_registry.CheckLocked(); in IsThreadStackOrTls()
545 ctx->thread_registry.CheckLocked(); in RestoreStack()
547 static_cast<ThreadContext *>(ctx->thread_registry.GetThreadLocked(tid)); in RestoreStack()
917 ThreadRegistryLock l0(&ctx->thread_registry); in ReportRace()
[all …]
H A Dtsan_rtl_mutex.cpp56 ThreadRegistryLock l(&ctx->thread_registry); in ReportMutexMisuse()
113 ThreadRegistryLock l(&ctx->thread_registry); in MutexDestroy()
429 ThreadRegistryLock l(&ctx->thread_registry); in AcquireGlobal()
430 ctx->thread_registry.RunCallbackForEachThreadLocked(UpdateClockCallback, thr); in AcquireGlobal()
484 ThreadRegistryLock l(&ctx->thread_registry); in AfterSleep()
485 ctx->thread_registry.RunCallbackForEachThreadLocked(UpdateSleepClockCallback, in AfterSleep()
532 ThreadRegistryLock l(&ctx->thread_registry); in ReportDeadlock()
H A Dtsan_debugging.cpp218 ctx->thread_registry.Lock(); in __tsan_locate_address()
220 ctx->thread_registry.Unlock(); in __tsan_locate_address()
255 ThreadContextBase *tctx = ctx->thread_registry.GetThreadLocked(b->tid); in __tsan_get_alloc_stack()
H A Dtsan_rtl.cpp115 thread_registry(CreateThreadContext, kMaxTid, kThreadQuarantineSize, in Context()
525 ctx->thread_registry.Lock(); in ForkBefore()
554 ctx->thread_registry.Unlock(); in ForkParentAfter()
565 ctx->thread_registry.Unlock(); in ForkChildAfter()
568 ctx->thread_registry.GetNumberOfThreads(0, 0, &nthread /* alive threads */); in ForkChildAfter()
H A Dtsan_platform_mac.cpp178 ctx->thread_registry.GetNumberOfThreads(&nthread, &nlive); in WriteMemoryProfile()
H A Dtsan_platform_linux.cpp128 ctx->thread_registry.GetNumberOfThreads(&nthread, &nlive); in WriteMemoryProfile()
H A Dtsan_mman.cpp165 ThreadRegistryLock l(&ctx->thread_registry); in SignalUnsafeCall()
H A Dtsan_rtl.h307 ThreadRegistry thread_registry; member
H A Dtsan_interceptors_posix.cpp1973 ThreadRegistryLock l(&ctx->thread_registry); in ReportErrnoSpoiling()
2423 __tsan::ctx->thread_registry.SetThreadNameByUserId(thread, name)
/llvm-project-15.0.7/compiler-rt/lib/tsan/tests/unit/
H A Dtsan_trace_test.cpp90 ThreadRegistryLock lock1(&ctx->thread_registry); in TRACE_TEST()
150 ThreadRegistryLock lock1(&ctx->thread_registry); in TRACE_TEST()
178 ThreadRegistryLock lock1(&ctx->thread_registry); in TRACE_TEST()
221 ThreadRegistryLock lock1(&ctx->thread_registry); in TRACE_TEST()