diff options
Diffstat (limited to 'contrib/compiler-rt/lib/tsan/rtl/tsan_trace.h')
-rw-r--r-- | contrib/compiler-rt/lib/tsan/rtl/tsan_trace.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/compiler-rt/lib/tsan/rtl/tsan_trace.h b/contrib/compiler-rt/lib/tsan/rtl/tsan_trace.h index 1da8752f6fa7..2569c7e42a47 100644 --- a/contrib/compiler-rt/lib/tsan/rtl/tsan_trace.h +++ b/contrib/compiler-rt/lib/tsan/rtl/tsan_trace.h @@ -20,9 +20,9 @@ namespace __tsan { -const int kTracePartSizeBits = 14; +const int kTracePartSizeBits = 13; const int kTracePartSize = 1 << kTracePartSizeBits; -const int kTraceParts = 4 * 1024 * 1024 / kTracePartSize; +const int kTraceParts = 2 * 1024 * 1024 / kTracePartSize; const int kTraceSize = kTracePartSize * kTraceParts; // Must fit into 3 bits. @@ -54,13 +54,15 @@ struct TraceHeader { }; struct Trace { - TraceHeader headers[kTraceParts]; Mutex mtx; #ifndef SANITIZER_GO // Must be last to catch overflow as paging fault. // Go shadow stack is dynamically allocated. uptr shadow_stack[kShadowStackSize]; #endif + // Must be the last field, because we unmap the unused part in + // CreateThreadContext. + TraceHeader headers[kTraceParts]; Trace() : mtx(MutexTypeTrace, StatMtxTrace) { |