summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/esan/esan_interface.cpp
diff options
context:
space:
mode:
authorDerek Bruening <bruening@google.com>2016-07-19 05:06:48 +0000
committerDerek Bruening <bruening@google.com>2016-07-19 05:06:48 +0000
commit0fc992442c2bd98412d55af9f3f16ec2358d9492 (patch)
treef900c4a55df51a9e2d8e8fb47f5335a124bf93d2 /compiler-rt/lib/esan/esan_interface.cpp
parente397812dcb9052990c567182d72ba33dcee096c2 (diff)
downloadbcm5719-llvm-0fc992442c2bd98412d55af9f3f16ec2358d9492.tar.gz
bcm5719-llvm-0fc992442c2bd98412d55af9f3f16ec2358d9492.zip
[esan|wset] Fix flaky sampling tests
Adds a new esan public interface routine __esan_get_sample_count() and uses it to ensure that tests of sampling receive the minimum number of samples. llvm-svn: 275948
Diffstat (limited to 'compiler-rt/lib/esan/esan_interface.cpp')
-rw-r--r--compiler-rt/lib/esan/esan_interface.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/esan/esan_interface.cpp b/compiler-rt/lib/esan/esan_interface.cpp
index 8a64d152611..43b3dff86f7 100644
--- a/compiler-rt/lib/esan/esan_interface.cpp
+++ b/compiler-rt/lib/esan/esan_interface.cpp
@@ -115,4 +115,8 @@ extern "C" {
SANITIZER_INTERFACE_ATTRIBUTE void __esan_report() {
reportResults();
}
+
+SANITIZER_INTERFACE_ATTRIBUTE unsigned int __esan_get_sample_count() {
+ return getSampleCount();
+}
} // extern "C"
OpenPOWER on IntegriCloud