• Home
  • Raw
  • Download

Lines Matching refs:thr

297 static void ForgetAllStateAndStartOver(TSanThread *thr, const char *reason);
298 static void FlushStateIfOutOfSegments(TSanThread *thr);
3304 INLINE CacheLine *TryAcquireLine(TSanThread *thr, uintptr_t a, int call_site) { in TryAcquireLine() argument
3323 INLINE CacheLine *AcquireLine(TSanThread *thr, uintptr_t a, int call_site) { in AcquireLine() argument
3328 line = TryAcquireLine(thr, a, call_site); in AcquireLine()
3336 Printf("T%d %s a=%p iter=%d\n", raw_tid(thr), __FUNCTION__, a, iter); in AcquireLine()
3345 raw_tid(thr), a, call_site); in AcquireLine()
3349 DCHECK(lines_[ComputeCacheLineIndexInCache(a)] == TidMagic(raw_tid(thr))); in AcquireLine()
3354 INLINE void ReleaseLine(TSanThread *thr, uintptr_t a, CacheLine *line, int call_site) { in ReleaseLine() argument
3361 DCHECK(*addr == TidMagic(raw_tid(thr))); in ReleaseLine()
3374 void AcquireAllLines(TSanThread *thr) { in AcquireAllLines() argument
3378 AcquireLine(thr, tag, __LINE__); in AcquireAllLines()
3388 INLINE CacheLine *GetLine(TSanThread *thr, uintptr_t a, bool create_new_if_need, int call_site) { in GetLine() argument
3407 line = AcquireLine(thr, tag, call_site); in GetLine()
3414 res = WriteBackAndFetch(thr, line, tag, cli, create_new_if_need); in GetLine()
3416 ReleaseLine(thr, a, line, call_site); in GetLine()
3428 INLINE CacheLine *GetLineOrCreateNew(TSanThread *thr, uintptr_t a, int call_site) { in GetLineOrCreateNew() argument
3429 return GetLine(thr, a, true, call_site); in GetLineOrCreateNew()
3431 INLINE CacheLine *GetLineIfExists(TSanThread *thr, uintptr_t a, int call_site) { in GetLineIfExists() argument
3432 return GetLine(thr, a, false, call_site); in GetLineIfExists()
3435 void ForgetAllState(TSanThread *thr) { in ForgetAllState() argument
3452 CacheLine *line = GetLineOrCreateNew(thr, it->first, __LINE__); in ForgetAllState()
3455 ReleaseLine(thr, line->tag(), line, __LINE__); in ForgetAllState()
3520 NOINLINE CacheLine *WriteBackAndFetch(TSanThread *thr, CacheLine *old_line, in WriteBackAndFetch() argument
3567 DCHECK(lines_[cli] == TidMagic(raw_tid(thr))); in WriteBackAndFetch()
3719 static void PublishRangeInOneLine(TSanThread *thr, uintptr_t addr, uintptr_t a, in PublishRangeInOneLine() argument
3726 CacheLine *line = G_cache->GetLineOrCreateNew(thr, tag, __LINE__); in PublishRangeInOneLine()
3736 G_cache->ReleaseLine(thr, tag, line, __LINE__); in PublishRangeInOneLine()
3751 static void PublishRange(TSanThread *thr, uintptr_t a, uintptr_t b, VTS *vts) { in PublishRange() argument
3760 PublishRangeInOneLine(thr, tag, a - tag, b - tag, vts); in PublishRange()
3764 PublishRangeInOneLine(thr, a, a - a_tag, CacheLine::kLineSize, vts); in PublishRange()
3767 PublishRangeInOneLine(thr, tag_i, 0, CacheLine::kLineSize, vts); in PublishRange()
3770 PublishRangeInOneLine(thr, line2_tag, 0, b - line2_tag, vts); in PublishRange()
5095 TSanThread *thr = Get(TID(i)); in ForgetAllState() local
5096 thr->recent_segments_cache_.ForgetAllState(); in ForgetAllState()
5097 thr->sid_ = SID(); // Reset the old SID so we don't try to read its VTS. in ForgetAllState()
5099 if (thr->is_running()) { in ForgetAllState()
5100 thr->NewSegmentWithoutUnrefingOld("ForgetAllState", singleton_vts); in ForgetAllState()
5103 thr->child_tid_to_create_info_.begin(); in ForgetAllState()
5104 j != thr->child_tid_to_create_info_.end(); ++j) { in ForgetAllState()
5110 if (thr->vts_at_exit_) { in ForgetAllState()
5111 VTS::Unref(thr->vts_at_exit_); in ForgetAllState()
5112 thr->vts_at_exit_ = singleton_vts->Clone(); in ForgetAllState()
5114 thr->dead_sids_.clear(); in ForgetAllState()
5115 thr->fresh_sids_.clear(); in ForgetAllState()
5281 void HandleWrite(TSanThread* thr,
5289 uint64_t HandleRead(TSanThread* thr,
5358 void INLINE ClearMemoryStateInOneLine(TSanThread *thr, uintptr_t addr, in ClearMemoryStateInOneLine() argument
5361 CacheLine *line = G_cache->GetLineIfExists(thr, addr, __LINE__); in ClearMemoryStateInOneLine()
5374 G_cache->ReleaseLine(thr, addr, line, __LINE__); in ClearMemoryStateInOneLine()
5379 void NOINLINE ClearMemoryState(TSanThread *thr, uintptr_t a, uintptr_t b) { in ClearMemoryState() argument
5386 ClearMemoryStateInOneLine(thr, a, a - single_line_tag, in ClearMemoryState()
5392 ClearMemoryStateInOneLine(thr, a, a - a_tag, CacheLine::kLineSize); in ClearMemoryState()
5396 ClearMemoryStateInOneLine(thr, tag_i, 0, CacheLine::kLineSize); in ClearMemoryState()
5400 ClearMemoryStateInOneLine(thr, line2_tag, 0, b - line2_tag); in ClearMemoryState()
5408 CacheLine *line = G_cache->GetLineOrCreateNew(thr, x, __LINE__); in ClearMemoryState()
5410 G_cache->ReleaseLine(thr, x, line, __LINE__); in ClearMemoryState()
5454 static void ForgetAllStateAndStartOver(TSanThread *thr, const char *reason) { in ForgetAllStateAndStartOver() argument
5458 Report("T%d INFO: %s. Flushing state.\n", raw_tid(thr), reason); in ForgetAllStateAndStartOver()
5464 G_cache->AcquireAllLines(thr); in ForgetAllStateAndStartOver()
5501 G_cache->ForgetAllState(thr); in ForgetAllStateAndStartOver()
5505 Report("T%d INFO: Flush took %ld ms\n", raw_tid(thr), in ForgetAllStateAndStartOver()
5510 static INLINE void FlushStateIfOutOfSegments(TSanThread *thr) { in FlushStateIfOutOfSegments() argument
5517 ForgetAllStateAndStartOver(thr, "run out of segment IDs"); in FlushStateIfOutOfSegments()
5668 bool NOINLINE AddReport(TSanThread *thr, uintptr_t pc, bool is_w, uintptr_t addr, in AddReport() argument
5715 StackTrace *stack_trace = thr->CreateStackTrace(pc); in AddReport()
5746 race_report->last_access_tid = thr->tid(); in AddReport()
5747 race_report->last_access_sid = thr->sid(); in AddReport()
5751 race_report->last_acces_lsid[false] = thr->lsid(false); in AddReport()
5752 race_report->last_acces_lsid[true] = thr->lsid(true); in AddReport()
5754 Segment *seg = Segment::Get(thr->sid()); in AddReport()
5756 CHECK(thr->lsid(false) == seg->lsid(false)); in AddReport()
5757 CHECK(thr->lsid(true) == seg->lsid(true)); in AddReport()
5855 TSanThread *thr = TSanThread::Get(tid); in PrintRaceReport() local
5882 thr->ThreadName().c_str(), in PrintRaceReport()
6182 void Sample(TSanThread *thr, const char *event_name, bool need_locking) { in Sample() argument
6189 string pos = thr->CallStackToStringRtnOnly(G_flags->sample_events_depth); in Sample()
6254 void INLINE HandleTraceLoop(TSanThread *thr, uintptr_t pc, in HandleTraceLoop() argument
6271 n_locks += HandleMemoryAccessInternal(thr, &sblock_pc, addr, mop, in HandleTraceLoop()
6276 const size_t mop_stat_size = TS_ARRAY_SIZE(thr->stats.mops_per_trace); in HandleTraceLoop()
6277 thr->stats.mops_per_trace[min(n, mop_stat_size - 1)]++; in HandleTraceLoop()
6278 const size_t stat_size = TS_ARRAY_SIZE(thr->stats.locks_per_trace); in HandleTraceLoop()
6279 thr->stats.locks_per_trace[min(n_locks, stat_size - 1)]++; in HandleTraceLoop()
6289 void HandleTrace(TSanThread *thr, MopInfo *mops, size_t n, uintptr_t pc, in HandleTrace() argument
6294 int expensive_bits = thr->expensive_bits(); in HandleTrace()
6297 HandleTraceLoop(thr, pc, mops, tleb, n, 0, need_locking); in HandleTrace()
6303 HandleTraceLoop(thr, pc, mops, tleb, n, expensive_bits, need_locking); in HandleTrace()
6311 void INLINE HandleMemoryAccess(TSanThread *thr, uintptr_t pc, in HandleMemoryAccess() argument
6316 HandleTrace(thr, &mop, 1, 0/*no sblock*/, &addr, need_locking); in HandleMemoryAccess()
6378 void FlushIfOutOfMem(TSanThread *thr) { in FlushIfOutOfMem() argument
6400 ForgetAllStateAndStartOver(thr, in FlushIfOutOfMem()
6412 void FlushIfNeeded(TSanThread *thr) { in FlushIfNeeded() argument
6426 FlushIfOutOfMem(thr); in FlushIfNeeded()
6454 TSanThread *thr = TSanThread::Get(tid); in HandleRtnCall() local
6455 thr->HandleRtnCall(call_pc, target_pc, ignore_below); in HandleRtnCall()
6456 FlushIfNeeded(thr); in HandleRtnCall()
6465 TSanThread *thr = NULL; in HandleOneEvent() local
6467 thr = TSanThread::Get(TID(e->tid())); in HandleOneEvent()
6468 DCHECK(thr); in HandleOneEvent()
6469 thr->SetTopPc(e->pc()); in HandleOneEvent()
6470 thr->stats.events[type]++; in HandleOneEvent()
6475 HandleMemoryAccess(thr, e->pc(), e->a(), e->info(), false, true); in HandleOneEvent()
6478 HandleMemoryAccess(thr, e->pc(), e->a(), e->info(), true, true); in HandleOneEvent()
6485 thr->HandleRtnExit(); in HandleOneEvent()
6501 FlushStateIfOutOfSegments(thr); in HandleOneEvent()
6504 thr->GetSomeFreshSids(); in HandleOneEvent()
6510 if (thr->ignore_reads() && thr->ignore_writes()) break; in HandleOneEvent()
6511 thr->HandleSblockEnter(e->pc(), /*allow_slow_path=*/true); in HandleOneEvent()
6514 thr->HandleThreadCreateBefore(TID(e->tid()), e->pc()); in HandleOneEvent()
6517 thr->HandleThreadCreateAfter(TID(e->tid()), TID(e->info())); in HandleOneEvent()
6532 case WRITER_LOCK : thr->HandleLock(e->a(), true); break; in HandleOneEvent()
6533 case READER_LOCK : thr->HandleLock(e->a(), false); break; in HandleOneEvent()
6534 case UNLOCK : thr->HandleUnlock(e->a()); break; in HandleOneEvent()
6540 case SIGNAL : thr->HandleSignal(e->a()); break; in HandleOneEvent()
6541 case WAIT : thr->HandleWait(e->a()); break; in HandleOneEvent()
6544 thr->HandleBarrierInit(e->a(), e->info()); in HandleOneEvent()
6547 thr->HandleBarrierWaitBefore(e->a()); in HandleOneEvent()
6550 thr->HandleBarrierWaitAfter(e->a()); in HandleOneEvent()
6593 thr->set_thread_name((const char*)e->a()); in HandleOneEvent()
6712 TSanThread *thr = TSanThread::Get(tid); in HandleBenignRace() local
6719 CacheLine *line = G_cache->GetLineOrCreateNew(thr, p, __LINE__); in HandleBenignRace()
6722 G_cache->ReleaseLine(thr, p, line, __LINE__); in HandleBenignRace()
6861 TSanThread *thr = TSanThread::Get(TID(e->tid())); in HandleTraceMem() local
6863 CacheLine *line = G_cache->GetLineOrCreateNew(thr, a, __LINE__); in HandleTraceMem()
6866 G_cache->ReleaseLine(thr, a, line, __LINE__); in HandleTraceMem()
6941 bool INLINE MemoryStateMachine(ShadowValue old_sval, TSanThread *thr, in MemoryStateMachine() argument
6944 SID cur_sid = thr->sid(); in MemoryStateMachine()
6979 sampler.Sample(thr, "HasTupleSS", false); in MemoryStateMachine()
7003 TSanThread *thr, in MemoryStateMachineSameThread() argument
7006 thr->stats.msm_branch_count[i]++; } while ((void)0, 0) in MemoryStateMachineSameThread()
7009 SID cur_sid = thr->sid(); in MemoryStateMachineSameThread()
7010 TID tid = thr->tid(); in MemoryStateMachineSameThread()
7026 thr->AddDeadSid(wr_sid, "FastPath01"); in MemoryStateMachineSameThread()
7072 thr->AddDeadSid(rd_sid, "FastPath10"); in MemoryStateMachineSameThread()
7085 thr->AddDeadSid(wr_sid, "FastPath11"); in MemoryStateMachineSameThread()
7100 thr->AddDeadSid(rd_sid, "FastPath11"); in MemoryStateMachineSameThread()
7109 thr->AddDeadSid(wr_sid, "FastPath11"); in MemoryStateMachineSameThread()
7114 thr->AddDeadSid(rd_sid, "FastPath11"); in MemoryStateMachineSameThread()
7131 TSanThread *thr, in HandleMemoryAccessHelper() argument
7149 is_w, old_sval, thr, sval_p); in HandleMemoryAccessHelper()
7160 thr->NewSegmentForWait(signaller_vts); in HandleMemoryAccessHelper()
7163 bool is_race = MemoryStateMachine(old_sval, thr, is_w, sval_p); in HandleMemoryAccessHelper()
7167 if (thr->ShouldReportRaces()) { in HandleMemoryAccessHelper()
7169 reports_.AddReport(thr, pc, is_w, addr, size, in HandleMemoryAccessHelper()
7197 if (sid == thr->sid()) { in HandleMemoryAccessHelper()
7215 TSanThread *thr, uintptr_t addr, MopInfo *mop, in HandleAccessGranularityAndExecuteHelper() argument
7235 if (has_expensive_flags) thr->stats.n_fast_access8++; in HandleAccessGranularityAndExecuteHelper()
7240 if (has_expensive_flags) thr->stats.n_slow_access8++; in HandleAccessGranularityAndExecuteHelper()
7255 if (has_expensive_flags) thr->stats.n_fast_access4++; in HandleAccessGranularityAndExecuteHelper()
7260 if (has_expensive_flags) thr->stats.n_slow_access4++; in HandleAccessGranularityAndExecuteHelper()
7272 if (has_expensive_flags) thr->stats.n_fast_access2++; in HandleAccessGranularityAndExecuteHelper()
7277 if (has_expensive_flags) thr->stats.n_slow_access2++; in HandleAccessGranularityAndExecuteHelper()
7288 if (has_expensive_flags) thr->stats.n_fast_access1++; in HandleAccessGranularityAndExecuteHelper()
7293 if (has_expensive_flags) thr->stats.n_slow_access1++; in HandleAccessGranularityAndExecuteHelper()
7301 if (has_expensive_flags) thr->stats.n_very_slow_access++; in HandleAccessGranularityAndExecuteHelper()
7319 if (!HandleMemoryAccessHelper(is_w, cache_line, x, 1, pc, thr, false)) in HandleAccessGranularityAndExecuteHelper()
7336 if (has_expensive_flags) thr->stats.n_access_slow_iter++; in HandleAccessGranularityAndExecuteHelper()
7345 if (!HandleMemoryAccessHelper(is_w, cache_line, x, s, pc, thr, false)) in HandleAccessGranularityAndExecuteHelper()
7352 thr, fast_path_only); in HandleAccessGranularityAndExecuteHelper()
7369 void DoTrace(TSanThread *thr, uintptr_t addr, MopInfo *mop, bool need_locking) { in DoTrace() argument
7375 CacheLine *cache_line = G_cache->GetLineOrCreateNew(thr, in DoTrace()
7381 raw_tid(thr), thr->sid().raw(), mop->is_write() ? "wr" : "rd", in DoTrace()
7387 thr->ReportStackTrace(pc); in DoTrace()
7389 G_cache->ReleaseLine(thr, x, cache_line, __LINE__); in DoTrace()
7399 void HandleMemoryAccessSlowLocked(TSanThread *thr, in HandleMemoryAccessSlowLocked() argument
7405 DCHECK(thr->lsid(false) == thr->segment()->lsid(false)); in HandleMemoryAccessSlowLocked()
7406 DCHECK(thr->lsid(true) == thr->segment()->lsid(true)); in HandleMemoryAccessSlowLocked()
7407 thr->FlushDeadSids(); in HandleMemoryAccessSlowLocked()
7411 thr->GetSomeFreshSids(); in HandleMemoryAccessSlowLocked()
7413 CacheLine *cache_line = G_cache->GetLineOrCreateNew(thr, addr, __LINE__); in HandleMemoryAccessSlowLocked()
7414 HandleAccessGranularityAndExecuteHelper(cache_line, thr, addr, in HandleMemoryAccessSlowLocked()
7418 G_cache->ReleaseLine(thr, addr, cache_line, __LINE__); in HandleMemoryAccessSlowLocked()
7423 DoTrace(thr, addr, mop, /*need_locking=*/false); in HandleMemoryAccessSlowLocked()
7428 sampler.Sample(thr, type, false); in HandleMemoryAccessSlowLocked()
7433 INLINE bool HandleMemoryAccessInternal(TSanThread *thr, in HandleMemoryAccessInternal() argument
7442 HandleMemoryAccessForAtomicityViolationDetector(thr, addr, mop); in HandleMemoryAccessInternal()
7446 DCHECK(thr->is_running()); in HandleMemoryAccessInternal()
7447 DCHECK(!thr->ignore_reads() || !thr->ignore_writes()); in HandleMemoryAccessInternal()
7456 INC_STAT(thr->stats.memory_access_sizes[mop->size() <= 16 ? mop->size() : 17 ]); in HandleMemoryAccessInternal()
7457 INC_STAT(thr->stats.events[mop->is_write() ? WRITE : READ]); in HandleMemoryAccessInternal()
7459 thr->stats.access_to_first_1g += (addr >> 30) == 0; in HandleMemoryAccessInternal()
7460 thr->stats.access_to_first_2g += (addr >> 31) == 0; in HandleMemoryAccessInternal()
7461 thr->stats.access_to_first_4g += ((uint64_t)addr >> 32) == 0; in HandleMemoryAccessInternal()
7468 if (thr->HasRoomForDeadSids()) { in HandleMemoryAccessInternal()
7470 cache_line = G_cache->TryAcquireLine(thr, addr, __LINE__); in HandleMemoryAccessInternal()
7475 if (thr->HandleSblockEnter(*sblock_pc, /*allow_slow_path=*/false)) { in HandleMemoryAccessInternal()
7478 cache_line, thr, addr, in HandleMemoryAccessInternal()
7483 G_cache->ReleaseLine(thr, addr, cache_line, __LINE__); in HandleMemoryAccessInternal()
7485 DoTrace(thr, addr, mop, /*need_locking=*/true); in HandleMemoryAccessInternal()
7488 INC_STAT(thr->stats.unlocked_access_ok); in HandleMemoryAccessInternal()
7496 G_cache->ReleaseLine(thr, addr, cache_line, __LINE__); in HandleMemoryAccessInternal()
7502 G_cache->ReleaseLine(thr, addr, cache_line, __LINE__); in HandleMemoryAccessInternal()
7507 G_cache->ReleaseLine(thr, addr, cache_line, __LINE__); in HandleMemoryAccessInternal()
7519 INC_STAT(thr->stats.locked_access[locked_access_case]); in HandleMemoryAccessInternal()
7524 thr->HandleSblockEnter(*sblock_pc, /*allow_slow_path=*/true); in HandleMemoryAccessInternal()
7526 HandleMemoryAccessSlowLocked(thr, addr, mop, in HandleMemoryAccessInternal()
7534 void HandleMemoryAccessForAtomicityViolationDetector(TSanThread *thr, in HandleMemoryAccessForAtomicityViolationDetector() argument
7538 TID tid = thr->tid(); in HandleMemoryAccessForAtomicityViolationDetector()
7539 if (thr->MemoryIsInStack(addr)) return; in HandleMemoryAccessForAtomicityViolationDetector()
7541 LSID wr_lsid = thr->lsid(0); in HandleMemoryAccessForAtomicityViolationDetector()
7542 LSID rd_lsid = thr->lsid(1); in HandleMemoryAccessForAtomicityViolationDetector()
7544 thr->increment_n_mops_since_start(); in HandleMemoryAccessForAtomicityViolationDetector()
7555 BitSet *range_set = thr->lock_era_access_set(mop->is_write()); in HandleMemoryAccessForAtomicityViolationDetector()
7583 TSanThread *thr = TSanThread::Get(tid); in HandleMalloc() local
7584 thr->NewSegmentForMallocEvent(); in HandleMalloc()
7587 ClearMemoryState(thr, a, b); in HandleMalloc()
7592 info.sid = thr->sid(); in HandleMalloc()
7597 Segment::ToString(thr->sid()).c_str(), in HandleMalloc()
7598 thr->segment()->vts()->ToString().c_str(), in HandleMalloc()
7616 void ImitateWriteOnFree(TSanThread *thr, uintptr_t a, uintptr_t size, uintptr_t pc) { in ImitateWriteOnFree() argument
7626 HandleMemoryAccess(thr, pc, a + i, this_size, in ImitateWriteOnFree()
7635 TSanThread *thr = TSanThread::Get(tid); in HandleFree() local
7639 thr->ReportStackTrace(e->pc()); in HandleFree()
7648 ImitateWriteOnFree(thr, a, size, pc); in HandleFree()
7653 ClearMemoryState(thr, a, a + size); in HandleFree()
7660 thr->HandleSblockEnter(pc, /*allow_slow_path*/true); in HandleFree()
7662 ImitateWriteOnFree(thr, a, size, pc); in HandleFree()
7724 TSanThread *thr = TSanThread::Get(tid); in HandleThreadFirstInsn() local
7725 thr->SetStack(stack_min, stack_max); in HandleThreadFirstInsn()
7726 ClearMemoryState(thr, thr->min_sp(), thr->max_sp()); in HandleThreadFirstInsn()
7733 TSanThread *thr = TSanThread::Get(tid); in HandleThreadStackTop() local
7757 ClearMemoryState(thr, sp_min, sp_max); in HandleThreadStackTop()
7758 thr->SetStack(sp_min, sp_max); in HandleThreadStackTop()
7764 TSanThread *thr = TSanThread::Get(tid); in HandleThreadEnd() local
7766 G_stats->Add(thr->stats); in HandleThreadEnd()
7767 thr->stats.Clear(); in HandleThreadEnd()
7780 ClearMemoryState(thr, child->min_sp(), child->max_sp()); in HandleThreadEnd()
7787 && (thr->ignore_reads() || thr->ignore_writes())) { in HandleThreadEnd()
7790 thr->ignore_reads(), thr->ignore_writes()); in HandleThreadEnd()
7792 StackTrace *context = thr->GetLastIgnoreContext(i); in HandleThreadEnd()
8647 extern NOINLINE void ThreadSanitizerHandleTrace(TSanThread *thr, TraceInfo *trace_info, in ThreadSanitizerHandleTrace() argument
8649 DCHECK(thr); in ThreadSanitizerHandleTrace()
8651 G_detector->HandleTrace(thr, in ThreadSanitizerHandleTrace()
8658 extern NOINLINE void ThreadSanitizerHandleOneMemoryAccess(TSanThread *thr, in ThreadSanitizerHandleOneMemoryAccess() argument
8661 DCHECK(thr); in ThreadSanitizerHandleOneMemoryAccess()
8662 G_detector->HandleTrace(thr, in ThreadSanitizerHandleOneMemoryAccess()
8677 TSanThread *thr = TSanThread::Get(TID(tid)); in ThreadSanitizerHandleRtnCall() local
8678 sampler.Sample(thr, "RTN_CALL", true); in ThreadSanitizerHandleRtnCall()
8730 TSanThread* thr = TSanThread::Get(TID(tid)); in ThreadSanitizerHandleAtomicOp() local
8739 thr->HandleAtomicMop((uintptr_t)a, pc, op, mo, size); in ThreadSanitizerHandleAtomicOp()
8755 rv = g_atomicCore->HandleRead(thr, (uintptr_t)a, rv, in ThreadSanitizerHandleAtomicOp()
8762 g_atomicCore->HandleRead(thr, (uintptr_t)a, rv, in ThreadSanitizerHandleAtomicOp()
8767 g_atomicCore->HandleWrite(thr, (uintptr_t)a, newv, prev, in ThreadSanitizerHandleAtomicOp()
8790 void TsanAtomicCore::HandleWrite(TSanThread* thr, in HandleWrite() argument
8808 hist.tid = thr->tid(); in HandleWrite()
8809 hist.clk = thr->vts()->clk(thr->tid()); in HandleWrite()
8820 hist.vts = VTS::Join(hprv.vts, thr->vts()); in HandleWrite()
8822 hist.vts = thr->vts()->Clone(); in HandleWrite()
8828 thr->NewSegmentForWait(hprv.vts); in HandleWrite()
8833 hist.vts = thr->vts()->Clone(); in HandleWrite()
8839 thr->NewSegmentForSignal(); in HandleWrite()
8842 thr->tid().raw(), a, in HandleWrite()
8843 thr->vts()->ToString().c_str(), in HandleWrite()
8844 Segment::ToString(thr->sid()).c_str(), in HandleWrite()
8847 thr->ReportStackTrace(); in HandleWrite()
8854 uint64_t TsanAtomicCore::HandleRead(TSanThread* thr, in HandleRead() argument
8865 int32_t const seen_seq0 = atomic->last_seen.clock(thr->tid()); in HandleRead()
8877 (unsigned)thr->vts()->clk(hist.tid)); in HandleRead()
8898 } else if (thr->vts()->clk(hist.tid) >= hist.clk) { in HandleRead()
8903 } else if (thr->random() % 2) { in HandleRead()
8920 thr->NewSegmentForWait(hist0->vts); in HandleRead()
8925 thr->tid().raw(), a, in HandleRead()
8926 thr->vts()->ToString().c_str(), in HandleRead()
8927 Segment::ToString(thr->sid()).c_str()); in HandleRead()
8929 thr->ReportStackTrace(); in HandleRead()
8935 atomic->last_seen.update(thr->tid(), seen_seq); in HandleRead()
8940 v = thr->random(); in HandleRead()