summaryrefslogtreecommitdiff
path: root/include/sanitizer
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
commit818c1248e0128d9058e997db8a9003270fbf80c7 (patch)
tree8c0d69bc8cd201d6b9802f3def4080dc99004d99 /include/sanitizer
parent189001e3bc9f050781628eba7da36f90725b04ba (diff)
[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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/sanitizer')
-rw-r--r--include/sanitizer/esan_interface.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sanitizer/esan_interface.h b/include/sanitizer/esan_interface.h
index 31e9b9b4d..4aff8d47b 100644
--- a/include/sanitizer/esan_interface.h
+++ b/include/sanitizer/esan_interface.h
@@ -39,6 +39,10 @@ extern "C" {
// data for that point in the run be reported from the tool.
void COMPILER_RT_WEAK __esan_report();
+// This function returns the number of samples that the esan tool has collected
+// to this point. This is useful for testing.
+unsigned int COMPILER_RT_WEAK __esan_get_sample_count();
+
#ifdef __cplusplus
} // extern "C"
#endif