aboutsummaryrefslogtreecommitdiff
path: root/lib/tsan/check_analyze.sh
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-12-30 11:52:19 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-12-30 11:52:19 +0000
commit5c909fa013fc285f010a95e8d387e0ef3412da9c (patch)
tree1059d068ad281f4776ff44cd414574f99a460023 /lib/tsan/check_analyze.sh
parentf31bcc68c72371a2bf63aead9f3373a1ff2053b6 (diff)
downloadsrc-5c909fa013fc285f010a95e8d387e0ef3412da9c.tar.gz
src-5c909fa013fc285f010a95e8d387e0ef3412da9c.zip
Vendor import of compiler-rt trunk r256633:vendor/compiler-rt/compiler-rt-trunk-r256633
Notes
Notes: svn path=/vendor/compiler-rt/dist/; revision=292925 svn path=/vendor/compiler-rt/compiler-rt-trunk-r256633/; revision=292926; tag=vendor/compiler-rt/compiler-rt-trunk-r256633
Diffstat (limited to 'lib/tsan/check_analyze.sh')
-rwxr-xr-xlib/tsan/check_analyze.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/tsan/check_analyze.sh b/lib/tsan/check_analyze.sh
index 4b33393ef648..0f6cc0698471 100755
--- a/lib/tsan/check_analyze.sh
+++ b/lib/tsan/check_analyze.sh
@@ -1,7 +1,17 @@
#!/bin/bash
+#
+# Script that checks that critical functions in TSan runtime have correct number
+# of push/pop/rsp instructions to verify that runtime is efficient enough.
+
set -u
-RES=$(./analyze_libtsan.sh)
+if [[ "$#" != 1 ]]; then
+ echo "Usage: $0 /path/to/binary/built/with/tsan"
+ exit 1
+fi
+
+SCRIPTDIR=$(dirname $0)
+RES=$(${SCRIPTDIR}/analyze_libtsan.sh $1)
PrintRes() {
printf "%s\n" "$RES"
}
@@ -22,7 +32,13 @@ for f in write1; do
check $f pop 2
done
-for f in write2 write4 write8; do
+for f in write2 write4; do
+ check $f rsp 1
+ check $f push 4
+ check $f pop 4
+done
+
+for f in write8; do
check $f rsp 1
check $f push 3
check $f pop 3