diff options
author | dim <dim@FreeBSD.org> | 2015-09-10 20:35:47 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-09-10 20:35:47 +0000 |
commit | 27c642b88ff253dca67f6dc0ca8ef4da0e9b7eb4 (patch) | |
tree | f8f8e6ce180ca5204b650ff6315e6e0893f9a679 /contrib/compiler-rt/include/sanitizer/coverage_interface.h | |
parent | 0c1fa3e6ad5b7fd602181bc094d752a27ea34568 (diff) | |
parent | 3da1400d07e473463df86668e1e50da8b02618fa (diff) | |
download | FreeBSD-src-27c642b88ff253dca67f6dc0ca8ef4da0e9b7eb4.zip FreeBSD-src-27c642b88ff253dca67f6dc0ca8ef4da0e9b7eb4.tar.gz |
Update compiler-rt to 3.7.0 release. This also includes the sanitizer
and profile libraries.
Diffstat (limited to 'contrib/compiler-rt/include/sanitizer/coverage_interface.h')
-rw-r--r-- | contrib/compiler-rt/include/sanitizer/coverage_interface.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/compiler-rt/include/sanitizer/coverage_interface.h b/contrib/compiler-rt/include/sanitizer/coverage_interface.h index 88a7e48..404b71e 100644 --- a/contrib/compiler-rt/include/sanitizer/coverage_interface.h +++ b/contrib/compiler-rt/include/sanitizer/coverage_interface.h @@ -39,6 +39,23 @@ extern "C" { // Some of the entries in *data will be zero. uintptr_t __sanitizer_get_coverage_guards(uintptr_t **data); + // The coverage instrumentation may optionally provide imprecise counters. + // Rather than exposing the counter values to the user we instead map + // the counters to a bitset. + // Every counter is associated with 8 bits in the bitset. + // We define 8 value ranges: 1, 2, 3, 4-7, 8-15, 16-31, 32-127, 128+ + // The i-th bit is set to 1 if the counter value is in the i-th range. + // This counter-based coverage implementation is *not* thread-safe. + + // Returns the number of registered coverage counters. + uintptr_t __sanitizer_get_number_of_counters(); + // Updates the counter 'bitset', clears the counters and returns the number of + // new bits in 'bitset'. + // If 'bitset' is nullptr, only clears the counters. + // Otherwise 'bitset' should be at least + // __sanitizer_get_number_of_counters bytes long and 8-aligned. + uintptr_t + __sanitizer_update_counter_bitset_and_clear_counters(uint8_t *bitset); #ifdef __cplusplus } // extern "C" #endif |