summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2015-09-03 11:20:46 +0000
committerDmitry Vyukov <dvyukov@google.com>2015-09-03 11:20:46 +0000
commit3464dac0ca0dd822610ebc3201ebe8bca1ccaf5b (patch)
treecd5a9138f7ba4bda8cdaf0d60ab60c79b7795833 /clang/lib/Basic/Targets.cpp
parentb500101e1ce02ace5dc0aa1e63a40e28928e37c2 (diff)
downloadbcm5719-llvm-3464dac0ca0dd822610ebc3201ebe8bca1ccaf5b.tar.gz
bcm5719-llvm-3464dac0ca0dd822610ebc3201ebe8bca1ccaf5b.zip
tsan: speed up race deduplication
Race deduplication code proved to be a performance bottleneck in the past if suppressions/annotations are used, or just some races left unaddressed. And we still get user complaints about this: https://groups.google.com/forum/#!topic/thread-sanitizer/hB0WyiTI4e4 ReportRace already has several layers of caching for racy pcs/addresses to make deduplication faster. However, ReportRace still takes a global mutex (ThreadRegistry and ReportMutex) during deduplication and also calls mmap/munmap (which take process-wide semaphore in kernel), this makes deduplication non-scalable. This patch moves race deduplication outside of global mutexes and also removes all mmap/munmap calls. As the result, race_stress.cc with 100 threads and 10000 iterations become 30x faster: before: real 0m21.673s user 0m5.932s sys 0m34.885s after: real 0m0.720s user 0m23.646s sys 0m1.254s http://reviews.llvm.org/D12554 llvm-svn: 246758
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud