aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2015-04-08 08:58:29 -0700
committerPirama Arumuga Nainar <pirama@google.com>2015-04-08 08:58:29 -0700
commit7c9150579ed0278492f51cc8434b1d63a44b9bd1 (patch)
treeffba1da06cea1fd707cfad245b93280a7df99700 /include
parent82f9cb33b564a9d72f09b478aabb44c4a83344c8 (diff)
downloadcompiler-rt-7c9150579ed0278492f51cc8434b1d63a44b9bd1.tar.gz
Update aosp/master compiler-rt for rebase to r233350
Change-Id: I5f20256ce73ec7b5956f742b4062f850bf11b667
Diffstat (limited to 'include')
-rw-r--r--include/sanitizer/coverage_interface.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/sanitizer/coverage_interface.h b/include/sanitizer/coverage_interface.h
index 88a7e4800..404b71e30 100644
--- a/include/sanitizer/coverage_interface.h
+++ b/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