summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_atomic.h
AgeCommit message (Collapse)Author
2016-11-29Return memory to OS right after free (not in the async thread).Evgeniy Stepanov
Summary: In order to avoid starting a separate thread to return unused memory to the system (the thread interferes with process startup on Android, Zygota waits for all threads to exit before fork, but this thread never exits), try to return it right after free. Reviewers: eugenis Subscribers: cryptoad, filcab, danalbert, kubabrecka, llvm-commits Patch by Aleksey Shlyapnikov. Differential Revision: https://reviews.llvm.org/D27003 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288091 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03tsan: speed up race deduplicationDmitry Vyukov
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@246758 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-29Use sanitizer_atomic_clang.h with clang-cl instead of the MSVC variantReid Kleckner
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238585 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-22asan: fix atomic operations on ARMDmitry Vyukov
implement correct atomic load/store for ARM add test for atomic load/store http://llvm-reviews.chandlerc.com/D2582 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@199802 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-02[ASan] cmake cleanup: make tab/space padding in CMakeLists consistent, ↵Alexey Samsonov
silence/fix some pedantic warnings git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159514 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29tsan/asan: first try on msvc atomicsDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159443 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29tsan/asan: add SpinMutex to sanitizer_commonDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159439 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29tsan/asan: unify atomics (move atomics from tsan to sanitizer_common)Dmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159437 91177308-0d34-0410-b5e6-96231b3b80d8