summaryrefslogtreecommitdiff
path: root/lib/tsan/rtl/tsan_stat.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2014-05-30 13:36:29 +0000
committerDmitry Vyukov <dvyukov@google.com>2014-05-30 13:36:29 +0000
commit2ff56e76c25aea0ee68c607fb8d7479caddb52ab (patch)
tree42300527d37f31dcdc2f6f68d59746ca7a0ec99e /lib/tsan/rtl/tsan_stat.h
parenta73e9db87100939b154c53948d56c3bb9c08a991 (diff)
tsan: optimize memory access functions
The optimization is two-fold: First, the algorithm now uses SSE instructions to handle all 4 shadow slots at once. This makes processing faster. Second, if shadow contains the same access, we do not store the event into trace. This increases effective trace size, that is, tsan can remember up to 10x more previous memory accesses. Perofrmance impact: Before: [ OK ] DISABLED_BENCH.Mop8Read (2461 ms) [ OK ] DISABLED_BENCH.Mop8Write (1836 ms) After: [ OK ] DISABLED_BENCH.Mop8Read (1204 ms) [ OK ] DISABLED_BENCH.Mop8Write (976 ms) But this measures only fast-path. On large real applications the speedup is ~20%. Trace size impact: On app1: Memory accesses : 1163265870 Including same : 791312905 (68%) on app2: Memory accesses : 166875345 Including same : 150449689 (90%) 90% of filtered events means that trace size is effectively 10x larger. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_stat.h')
-rw-r--r--lib/tsan/rtl/tsan_stat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tsan/rtl/tsan_stat.h b/lib/tsan/rtl/tsan_stat.h
index 8cdf14659..0bd949ed1 100644
--- a/lib/tsan/rtl/tsan_stat.h
+++ b/lib/tsan/rtl/tsan_stat.h
@@ -26,6 +26,7 @@ enum StatType {
StatMop4,
StatMop8,
StatMopSame,
+ StatMopIgnored,
StatMopRange,
StatMopRodata,
StatMopRangeRodata,