hanchenye-llvm-project/compiler-rt/lib/tsan
Dmitry Vyukov 3464dac0ca 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
2015-09-03 11:20:46 +00:00
..
benchmarks
dd [CMake] merge add_compiler_rt_runtime and add_compiler_rt_darwin_runtime into a single function 2015-08-25 19:53:09 +00:00
go [sanitizer] Implement logging to syslog. 2015-07-23 22:05:20 +00:00
rtl tsan: speed up race deduplication 2015-09-03 11:20:46 +00:00
tests [Sanitizers] Unify the semantics and usage of "exitcode" runtime flag across all sanitizers. 2015-08-21 20:49:37 +00:00
CMakeLists.txt [CMake] Add ARCHS option to add_sanitizer_rt_symbols. 2015-08-27 20:07:54 +00:00
Makefile.old [TSan] Attempt to fix old Makefile build. 2015-04-28 01:27:17 +00:00
analyze_libtsan.sh
check_analyze.sh [TSan] Update check_analyze.sh expectations to match trunk Clang output. 2015-02-02 22:17:23 +00:00
check_cmake.sh tsan: use a different dir for llvm build 2014-10-15 08:56:15 +00:00
check_memcpy.sh tsan: refactor storage of meta information for heap blocks and sync objects 2014-05-29 13:50:54 +00:00