]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libsanitizer/tsan/tsan_trace.h
[libsanitizer] merge from upstream r169371
[thirdparty/gcc.git] / libsanitizer / tsan / tsan_trace.h
index 69233a61bab88a472b36b78a00c5ebc9d46b59d4..154cc15c083f02a5cf848dd4a30f83a69502a558 100644 (file)
 
 namespace __tsan {
 
-#ifndef TSAN_HISTORY_SIZE  // in kibitraces
-#define TSAN_HISTORY_SIZE 128
-#endif
-
-const int kTracePartSize = 16 * 1024;
-const int kTraceParts = TSAN_HISTORY_SIZE * 1024 / kTracePartSize;
+const int kTracePartSizeBits = 14;
+const int kTracePartSize = 1 << kTracePartSizeBits;
+const int kTraceParts = 4 * 1024 * 1024 / kTracePartSize;
 const int kTraceSize = kTracePartSize * kTraceParts;
 
 // Must fit into 3 bits.
@@ -59,7 +56,6 @@ struct TraceHeader {
 };
 
 struct Trace {
-  Event events[kTraceSize];
   TraceHeader headers[kTraceParts];
   Mutex mtx;