diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2012-11-28 10:35:31 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2012-11-28 10:35:31 +0000 |
commit | 385542a2e83a4f37de4232d6c72097c1b7d6d44b (patch) | |
tree | 177e2b88084f05af79b61dfc07cd93d6153f5c8c /lib/tsan/rtl/tsan_rtl_report.cc | |
parent | 45bdb2ffb2878a6c22493af76256d5950dc0a6a2 (diff) |
tsan: move traces from tls into dedicated storage at fixed address
helps to reduce tls size (it's weird to have multi-MB tls)
will help with dynamically adjustable trace size
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168783 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_rtl_report.cc')
-rw-r--r-- | lib/tsan/rtl/tsan_rtl_report.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tsan/rtl/tsan_rtl_report.cc b/lib/tsan/rtl/tsan_rtl_report.cc index fa41b8dea..64b279858 100644 --- a/lib/tsan/rtl/tsan_rtl_report.cc +++ b/lib/tsan/rtl/tsan_rtl_report.cc @@ -277,8 +277,9 @@ void RestoreStack(int tid, const u64 epoch, StackTrace *stk) { DPrintf2(" #%02lu: pc=%zx\n", i, stack[i]); } uptr pos = hdr->stack0.Size(); + Event *events = (Event*)GetThreadTrace(tid); for (uptr i = ebegin; i <= eend; i++) { - Event ev = trace->events[i]; + Event ev = events[i]; EventType typ = (EventType)(ev >> 61); uptr pc = (uptr)(ev & 0xffffffffffffull); DPrintf2(" %zu typ=%d pc=%zx\n", i, typ, pc); @@ -416,8 +417,7 @@ void ReportRace(ThreadState *thr) { ScopedReport rep(freed ? ReportTypeUseAfterFree : ReportTypeRace); const uptr kMop = 2; StackTrace traces[kMop]; - const uptr toppc = thr->trace.events[thr->fast_state.epoch() % kTraceSize] - & ((1ull << 61) - 1); + const uptr toppc = TraceTopPC(thr); traces[0].ObtainCurrent(thr, toppc); if (IsFiredSuppression(ctx, rep, traces[0])) return; |