Skip to content

Commit 0c3539e

Browse files
committed
Move SymbolizeStackElems into OutputReport
1 parent 4b76f89 commit 0c3539e

File tree

7 files changed

+3
-10
lines changed

7 files changed

+3
-10
lines changed

compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,6 @@ static void ReportErrnoSpoiling(ThreadState *thr, uptr pc, int sig) {
21462146
rep.SetSigNum(sig);
21472147
if (!IsFiredSuppression(ctx, ReportTypeErrnoInSignal, stack)) {
21482148
rep.AddStack(stack, true);
2149-
rep.SymbolizeStackElems();
21502149
OutputReport(thr, rep);
21512150
}
21522151
}

compiler-rt/lib/tsan/rtl/tsan_interface_ann.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,6 @@ static void ReportMutexHeldWrongContext(ThreadState *thr, uptr pc) {
446446
VarSizeStackTrace trace;
447447
ObtainCurrentStack(thr, pc, &trace);
448448
rep.AddStack(trace, true);
449-
rep.SymbolizeStackElems();
450449
OutputReport(thr, rep);
451450
}
452451

compiler-rt/lib/tsan/rtl/tsan_mman.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ static void SignalUnsafeCall(ThreadState *thr, uptr pc) {
185185
ThreadRegistryLock l(&ctx->thread_registry);
186186
ScopedReport rep(ReportTypeSignalUnsafe);
187187
rep.AddStack(stack, true);
188-
rep.SymbolizeStackElems();
189188
OutputReport(thr, rep);
190189
}
191190

compiler-rt/lib/tsan/rtl/tsan_rtl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ void ForkChildAfter(ThreadState *thr, uptr pc, bool start_thread);
499499

500500
void ReportRace(ThreadState *thr, RawShadow *shadow_mem, Shadow cur, Shadow old,
501501
AccessType typ);
502-
bool OutputReport(ThreadState *thr, const ScopedReport &srep);
502+
bool OutputReport(ThreadState *thr, ScopedReport &srep);
503503
bool IsFiredSuppression(Context *ctx, ReportType type, StackTrace trace);
504504
bool IsExpectedReport(uptr addr, uptr size);
505505

compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ static void ReportMutexMisuse(ThreadState *thr, uptr pc, ReportType typ,
6262
ObtainCurrentStack(thr, pc, &trace);
6363
rep.AddStack(trace, true);
6464
rep.AddLocation(addr, 1);
65-
rep.SymbolizeStackElems();
6665
OutputReport(thr, rep);
6766
}
6867

@@ -551,7 +550,6 @@ void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r) {
551550
rep.AddStack(stack, true);
552551
}
553552
}
554-
rep.SymbolizeStackElems();
555553
OutputReport(thr, rep);
556554
}
557555

@@ -576,7 +574,6 @@ void ReportDestroyLocked(ThreadState *thr, uptr pc, uptr addr,
576574
return;
577575
rep.AddStack(trace, true);
578576
rep.AddLocation(addr, 1);
579-
rep.SymbolizeStackElems();
580577
OutputReport(thr, rep);
581578
}
582579

compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,11 +672,12 @@ static bool HandleRacyStacks(ThreadState *thr, VarSizeStackTrace traces[2]) {
672672
return false;
673673
}
674674

675-
bool OutputReport(ThreadState *thr, const ScopedReport &srep) {
675+
bool OutputReport(ThreadState *thr, ScopedReport &srep) {
676676
// These should have been checked in ShouldReport.
677677
// It's too late to check them here, we have already taken locks.
678678
CHECK(flags()->report_bugs);
679679
CHECK(!thr->suppress_reports);
680+
srep.SymbolizeStackElems();
680681
atomic_store_relaxed(&ctx->last_symbolize_time_ns, NanoTime());
681682
const ReportDesc *rep = srep.GetReport();
682683
CHECK_EQ(thr->current_report, nullptr);
@@ -863,7 +864,6 @@ void ReportRace(ThreadState *thr, RawShadow *shadow_mem, Shadow cur, Shadow old,
863864
s[1].epoch() <= thr->last_sleep_clock.Get(s[1].sid()))
864865
rep.AddSleep(thr->last_sleep_stack_id);
865866
#endif
866-
rep.SymbolizeStackElems();
867867
OutputReport(thr, rep);
868868
}
869869

compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ void ThreadFinalize(ThreadState *thr) {
9696
ScopedReport rep(ReportTypeThreadLeak);
9797
rep.AddThread(leaks[i].tctx, true);
9898
rep.SetCount(leaks[i].count);
99-
rep.SymbolizeStackElems();
10099
OutputReport(thr, rep);
101100
}
102101
#endif

0 commit comments

Comments
 (0)