[compiler-rt] r229113 - tsan: reduce size of vector clock in Go mode
Dmitry Vyukov
dvyukov at google.com
Fri Feb 13 07:32:34 PST 2015
Author: dvyukov
Date: Fri Feb 13 09:32:34 2015
New Revision: 229113
URL: http://llvm.org/viewvc/llvm-project?rev=229113&view=rev
Log:
tsan: reduce size of vector clock in Go mode
Go does not have freed memory.
Reduces per-goroutine overhead from 455K to 356K.
https://code.google.com/p/thread-sanitizer/issues/detail?id=89
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_defs.h
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_defs.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_defs.h?rev=229113&r1=229112&r2=229113&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_defs.h (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_defs.h Fri Feb 13 09:32:34 2015
@@ -35,7 +35,11 @@ const char *const kTsanOptionsEnv = "TSA
const int kTidBits = 13;
const unsigned kMaxTid = 1 << kTidBits;
+#ifndef SANITIZER_GO
const unsigned kMaxTidInClock = kMaxTid * 2; // This includes msb 'freed' bit.
+#else
+const unsigned kMaxTidInClock = kMaxTid; // Go does not track freed memory.
+#endif
const int kClkBits = 42;
const unsigned kMaxTidReuse = (1 << (64 - kClkBits)) - 1;
const uptr kShadowStackSize = 64 * 1024;
More information about the llvm-commits
mailing list