| /llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_thread_registry.cpp | 141 if (tctx) { in CreateThread() 142 tid = tctx->tid; in CreateThread() 158 CHECK_NE(tctx, 0); in CreateThread() 183 if (tctx == 0) in RunCallbackForEachThreadLocked() 185 cb(tctx, arg); in RunCallbackForEachThreadLocked() 193 if (tctx != 0 && cb(tctx, arg)) in FindThread() 204 if (tctx != 0 && cb(tctx, arg)) in FindThreadContextLocked() 205 return tctx; in FindThreadContextLocked() 329 tctx->Reset(); in QuarantinePush() 341 return tctx; in QuarantinePop() [all …]
|
| H A D | sanitizer_thread_registry.h | 111 typedef void (*ThreadCallback)(ThreadContextBase *tctx, void *arg); 116 typedef bool (*FindThreadCallback)(ThreadContextBase *tctx, void *arg); 160 void QuarantinePush(ThreadContextBase *tctx);
|
| /llvm-project-15.0.7/compiler-rt/lib/tsan/rtl/ |
| H A D | tsan_rtl_thread.cpp | 35 ThreadContext *tctx; member 42 if (tctx->detached || tctx->status != ThreadStatusFinished) in CollectThreadLeaks() 45 if (leaks[i].tctx->creation_stack_id == tctx->creation_stack_id) { in CollectThreadLeaks() 50 leaks.PushBack({tctx, 1}); in CollectThreadLeaks() 58 if (tctx->tid == kMainTid) { in ReportIgnoresEnabled() 62 " created at:\n", tctx->tid, tctx->name); in ReportIgnoresEnabled() 161 Free(thr->tctx->sync); in ThreadStart() 208 thr->tctx = this; in OnStarted() 232 if (!thr->tctx->detached) { in ThreadFinish() 275 thr->tctx = nullptr; in OnFinished() [all …]
|
| H A D | tsan_rtl_report.cpp | 213 rt->id = tctx->tid; in AddThread() 245 ThreadContext *tctx = in IsThreadStackOrTls() local 248 if (!tctx) in IsThreadStackOrTls() 253 return tctx; in IsThreadStackOrTls() 292 if (tctx) in AddLocation() 293 AddThread(tctx); in AddLocation() 316 AddThread(tctx); in AddLocation() 323 loc->tid = tctx->tid; in AddLocation() 325 AddThread(tctx); in AddLocation() 459 ThreadContext *tctx = in RestoreStack() local [all …]
|
| H A D | tsan_rtl.cpp | 84 Trace* trace = &thr->tctx->trace; in TracePartAlloc() 149 auto trace = &tctx->trace; in DoResetImpl() 151 bool attached = tctx->thr && tctx->thr->slot; in DoResetImpl() 171 &tctx->thr->trace_pos, in DoResetImpl() 180 if (tctx->thr && !tctx->thr->slot) { in DoResetImpl() 181 atomic_store_relaxed(&tctx->thr->trace_pos, 0); in DoResetImpl() 182 tctx->thr->trace_prev_pc = 0; in DoResetImpl() 323 auto* trace = &thr->tctx->trace; in SlotDetachImpl() 332 thr->tctx->trace.local_head = nullptr; in SlotDetachImpl() 907 Trace *trace = &thr->tctx->trace; in TraceSkipGap() [all …]
|
| H A D | tsan_debugging.cpp | 219 ThreadContext *tctx = IsThreadStackOrTls(addr, &is_stack); in __tsan_locate_address() local 221 if (tctx) { in __tsan_locate_address() 255 ThreadContextBase *tctx = ctx->thread_registry.GetThreadLocked(b->tid); in __tsan_get_alloc_stack() local 256 *os_id = tctx->os_id; in __tsan_get_alloc_stack()
|
| H A D | tsan_rtl.h | 204 ThreadContext *tctx; member 410 void AddThread(const ThreadContext *tctx, bool suppressable = false); 698 { Lock lock(&thr->tctx->trace.mtx); } in TraceAcquire() 699 TracePart *current = thr->tctx->trace.parts.Back(); in TraceAcquire() 719 DCHECK_LE(evp + 1, &thr->tctx->trace.parts.Back()->events[TracePart::kSize]); in TraceRelease()
|
| H A D | tsan_platform_mac.cpp | 220 if (thr->tctx) { in ThreadTerminateCallback()
|
| /llvm-project-15.0.7/compiler-rt/lib/tsan/rtl-old/ |
| H A D | tsan_rtl_thread.cpp | 41 ThreadContext *tctx; member 47 auto *tctx = static_cast<ThreadContext *>(tctx_base); in CollectThreadLeaks() local 48 if (tctx->detached || tctx->status != ThreadStatusFinished) in CollectThreadLeaks() 51 if (leaks[i].tctx->creation_stack_id == tctx->creation_stack_id) { in CollectThreadLeaks() 56 leaks.PushBack({tctx, 1}); in CollectThreadLeaks() 62 if (tctx->tid == kMainTid) { in ReportIgnoresEnabled() 66 " created at:\n", tctx->tid, tctx->name); in ReportIgnoresEnabled() 101 rep.AddThread(leaks[i].tctx, true); in ThreadFinalize() 167 while (!thr->tctx->trace.parts.Empty()) thr->tctx->trace.parts.PopBack(); in ThreadStart() 214 thr->tctx = this; in OnStarted() [all …]
|
| H A D | tsan_rtl_report.cpp | 209 rt->id = tctx->tid; in AddThread() 256 if (!tctx) in IsThreadStackOrTls() 261 return tctx; in IsThreadStackOrTls() 331 if (tctx) in AddLocation() 332 AddThread(tctx); in AddLocation() 352 loc->tid = tctx ? tctx->tid : b->tid; in AddLocation() 355 if (tctx) in AddLocation() 356 AddThread(tctx); in AddLocation() 365 AddThread(tctx); in AddLocation() 560 if (tctx->thr) in RestoreStack() [all …]
|
| H A D | tsan_rtl_mutex.cpp | 416 ThreadContext *tctx = static_cast<ThreadContext*>(tctx_base); in UpdateClockCallback() local 417 u64 epoch = tctx->epoch1; in UpdateClockCallback() 418 if (tctx->status == ThreadStatusRunning) { in UpdateClockCallback() 419 epoch = tctx->thr->fast_state.epoch(); in UpdateClockCallback() 420 tctx->thr->clock.NoteGlobalAcquire(epoch); in UpdateClockCallback() 422 thr->clock.set(&thr->proc()->clock_cache, tctx->tid, epoch); in UpdateClockCallback() 472 ThreadContext *tctx = static_cast<ThreadContext*>(tctx_base); in UpdateSleepClockCallback() local 473 u64 epoch = tctx->epoch1; in UpdateSleepClockCallback() 474 if (tctx->status == ThreadStatusRunning) in UpdateSleepClockCallback() 475 epoch = tctx->thr->fast_state.epoch(); in UpdateSleepClockCallback() [all …]
|
| H A D | tsan_debugging.cpp | 219 ThreadContext *tctx = IsThreadStackOrTls(addr, &is_stack); in __tsan_locate_address() local 221 if (tctx) { in __tsan_locate_address() 255 ThreadContextBase *tctx = ctx->thread_registry.GetThreadLocked(b->tid); in __tsan_get_alloc_stack() local 256 *os_id = tctx->os_id; in __tsan_get_alloc_stack()
|
| H A D | tsan_rtl.h | 186 ThreadContext *tctx; member 354 void AddThread(const ThreadContext *tctx, bool suppressable = false); 684 { Lock lock(&thr->tctx->trace.mtx); } in TraceAcquire() 685 TracePart *current = thr->tctx->trace.parts.Back(); in TraceAcquire() 705 DCHECK_LE(evp + 1, &thr->tctx->trace.parts.Back()->events[TracePart::kSize]); in TraceRelease()
|
| H A D | tsan_platform_mac.cpp | 241 if (thr->tctx) { in my_pthread_introspection_hook()
|
| /llvm-project-15.0.7/compiler-rt/lib/asan/ |
| H A D | asan_thread.cpp | 408 AsanThreadContext *tctx = static_cast<AsanThreadContext *>(tctx_base); in ThreadStackContainsAddress() local 409 AsanThread *t = tctx->thread; in ThreadStackContainsAddress() 430 AsanThreadContext *tctx = GetThreadContextByTidLocked(kMainTid); in GetCurrentThread() local 431 if (tctx && ThreadStackContainsAddress(tctx, &context)) { in GetCurrentThread() 432 SetCurrentThread(tctx->thread); in GetCurrentThread() 433 return tctx->thread; in GetCurrentThread() 458 AsanThreadContext *tctx = static_cast<AsanThreadContext *>( in FindThreadByStackAddress() local 461 return tctx ? tctx->thread : nullptr; in FindThreadByStackAddress()
|
| H A D | asan_stats.cpp | 76 AsanThreadContext *tctx = static_cast<AsanThreadContext*>(tctx_base); in MergeThreadStats() local 77 if (AsanThread *t = tctx->thread) in MergeThreadStats()
|
| H A D | asan_allocator.cpp | 1156 void GetAdditionalThreadContextPtrs(ThreadContextBase *tctx, void *ptrs) { in GetAdditionalThreadContextPtrs() argument 1165 reinterpret_cast<__asan::AsanThreadContext *>(tctx); in GetAdditionalThreadContextPtrs()
|
| /llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/tests/ |
| H A D | sanitizer_thread_registry_test.cpp | 51 static bool HasName(ThreadContextBase *tctx, void *arg) { in HasName() argument 53 return (0 == internal_strcmp(tctx->name, name)); in HasName() 56 static bool HasUid(ThreadContextBase *tctx, void *arg) { in HasUid() argument 58 return (tctx->user_id == uid); in HasUid() 61 static void MarkUidAsPresent(ThreadContextBase *tctx, void *arg) { in MarkUidAsPresent() argument 63 arr[tctx->tid] = true; in MarkUidAsPresent()
|
| /llvm-project-15.0.7/compiler-rt/lib/lsan/ |
| H A D | lsan_fuchsia.cpp | 72 [](ThreadContextBase *tctx, void *arg) { in GetAllThreadAllocatorCachesLocked() argument 73 auto ctx = static_cast<ThreadContext *>(tctx); in GetAllThreadAllocatorCachesLocked()
|
| H A D | lsan_common_fuchsia.cpp | 150 [](ThreadContextBase *tctx, void *arg) { in LockStuffAndStopTheWorld() argument 151 ForEachExtraStackRange(tctx->os_id, ForEachExtraStackRangeCb, in LockStuffAndStopTheWorld()
|
| H A D | lsan_common.cpp | 640 static void ReportIfNotSuspended(ThreadContextBase *tctx, void *arg) { in ReportIfNotSuspended() argument 643 if (tctx->status == ThreadStatusRunning) { in ReportIfNotSuspended() 644 uptr i = InternalLowerBound(suspended_threads, tctx->os_id); in ReportIfNotSuspended() 645 if (i >= suspended_threads.size() || suspended_threads[i] != tctx->os_id) in ReportIfNotSuspended() 648 tctx->os_id); in ReportIfNotSuspended()
|
| H A D | lsan_common.h | 155 void GetAdditionalThreadContextPtrs(ThreadContextBase *tctx, void *ptrs);
|
| H A D | lsan_allocator.cpp | 322 void GetAdditionalThreadContextPtrs(ThreadContextBase *tctx, void *ptrs) { in GetAdditionalThreadContextPtrs() argument
|
| /llvm-project-15.0.7/compiler-rt/lib/memprof/ |
| H A D | memprof_stats.cpp | 76 MemprofThreadContext *tctx = static_cast<MemprofThreadContext *>(tctx_base); in MergeThreadStats() local 77 if (MemprofThread *t = tctx->thread) in MergeThreadStats()
|
| /llvm-project-15.0.7/compiler-rt/lib/tsan/tests/unit/ |
| H A D | tsan_trace_test.cpp | 275 CHECK_EQ(thr->tctx->trace.parts.Size(), size); in TRACE_TEST()
|