diff options
| author | Derek Bruening <bruening@google.com> | 2016-07-19 05:06:48 +0000 |
|---|---|---|
| committer | Derek Bruening <bruening@google.com> | 2016-07-19 05:06:48 +0000 |
| commit | 0fc992442c2bd98412d55af9f3f16ec2358d9492 (patch) | |
| tree | f900c4a55df51a9e2d8e8fb47f5335a124bf93d2 /compiler-rt/lib/esan/working_set.cpp | |
| parent | e397812dcb9052990c567182d72ba33dcee096c2 (diff) | |
| download | bcm5719-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/working_set.cpp')
| -rw-r--r-- | compiler-rt/lib/esan/working_set.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler-rt/lib/esan/working_set.cpp b/compiler-rt/lib/esan/working_set.cpp index 3fde5a8b5fc..f39111993c3 100644 --- a/compiler-rt/lib/esan/working_set.cpp +++ b/compiler-rt/lib/esan/working_set.cpp @@ -190,6 +190,11 @@ static void takeSample(void *Arg) { } } +unsigned int getSampleCountWorkingSet() +{ + return SnapshotNum; +} + // Initialization that must be done before any instrumented code is executed. void initializeShadowWorkingSet() { CHECK(getFlags()->cache_line_size == CacheLineSize); |

