| /llvm-project-15.0.7/compiler-rt/lib/lsan/ |
| H A D | lsan_thread.cpp | 26 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 D | tsan_rtl_thread.cpp | 91 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 D | tsan_rtl_report.cpp | 137 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 D | tsan_rtl.cpp | 136 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 D | tsan_debugging.cpp | 218 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 D | tsan_rtl_mutex.cpp | 58 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 D | tsan_platform_mac.cpp | 173 ctx->thread_registry.GetNumberOfThreads(&nthread, &nlive); in WriteMemoryProfile()
|
| H A D | tsan_platform_linux.cpp | 125 ctx->thread_registry.GetNumberOfThreads(&nthread, &nlive); in WriteMemoryProfile()
|
| H A D | tsan_mman.cpp | 171 ThreadRegistryLock l(&ctx->thread_registry); in SignalUnsafeCall()
|
| H A D | tsan_rtl.h | 315 ThreadRegistry thread_registry; member
|
| H A D | tsan_interceptors_posix.cpp | 1975 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 D | tsan_rtl_thread.cpp | 95 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 D | tsan_rtl_report.cpp | 137 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 D | tsan_rtl_mutex.cpp | 56 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 D | tsan_debugging.cpp | 218 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 D | tsan_rtl.cpp | 115 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 D | tsan_platform_mac.cpp | 178 ctx->thread_registry.GetNumberOfThreads(&nthread, &nlive); in WriteMemoryProfile()
|
| H A D | tsan_platform_linux.cpp | 128 ctx->thread_registry.GetNumberOfThreads(&nthread, &nlive); in WriteMemoryProfile()
|
| H A D | tsan_mman.cpp | 165 ThreadRegistryLock l(&ctx->thread_registry); in SignalUnsafeCall()
|
| H A D | tsan_rtl.h | 307 ThreadRegistry thread_registry; member
|
| H A D | tsan_interceptors_posix.cpp | 1973 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 D | tsan_trace_test.cpp | 90 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()
|