diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2015-02-13 15:32:34 +0000 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2015-02-13 15:32:34 +0000 |
| commit | c30c5f7d9db765963014131c906b767f5c0826c5 (patch) | |
| tree | 3a843206e695221eb9d49b76b16d04ee0dbdd8e4 | |
| parent | 41f4eba02d285d19715825dacf7e56e7d0442fc2 (diff) | |
| download | bcm5719-llvm-c30c5f7d9db765963014131c906b767f5c0826c5.tar.gz bcm5719-llvm-c30c5f7d9db765963014131c906b767f5c0826c5.zip | |
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
llvm-svn: 229113
| -rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_defs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_defs.h b/compiler-rt/lib/tsan/rtl/tsan_defs.h index 24d5cb5a960..971178d8a3e 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_defs.h +++ b/compiler-rt/lib/tsan/rtl/tsan_defs.h @@ -35,7 +35,11 @@ const char *const kTsanOptionsEnv = "TSAN_OPTIONS"; 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; |

