summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Aizatsky <aizatsky@chromium.org>2016-08-05 20:09:42 +0000
committerMike Aizatsky <aizatsky@chromium.org>2016-08-05 20:09:42 +0000
commit3ac7cf5c6b6f53bb09e4ba6ba20b152ae3c2e6b4 (patch)
treef36229fc6d97ee92be3a457ee43a46036ef2a7a4 /include
parenta0b4c0e540a9fe703ef2ee8f515bb79b4255e996 (diff)
[sanitizers] trace buffer API to use user-allocated buffer.
Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D23186 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/sanitizer/coverage_interface.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/sanitizer/coverage_interface.h b/include/sanitizer/coverage_interface.h
index 2dcc09fc8..72ac843fa 100644
--- a/include/sanitizer/coverage_interface.h
+++ b/include/sanitizer/coverage_interface.h
@@ -41,13 +41,6 @@ extern "C" {
// Some of the entries in *data will be zero.
uintptr_t __sanitizer_get_coverage_guards(uintptr_t **data);
- // Set *data to the growing buffer with covered PCs and return the size
- // of the buffer. The entries are never zero.
- // When only unique pcs are collected, the size is equal to
- // __sanitizer_get_total_unique_coverage.
- // WARNING: EXPERIMENTAL API.
- uintptr_t __sanitizer_get_coverage_pc_buffer(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.
@@ -65,6 +58,15 @@ extern "C" {
// __sanitizer_get_number_of_counters bytes long and 8-aligned.
uintptr_t
__sanitizer_update_counter_bitset_and_clear_counters(uint8_t *bitset);
+
+ // EXPERIMENTAL API
+ // Set allocated buffer to record new coverage PCs as they are executed.
+ // Buffer length is specified in uptrs.
+ void __sanitizer_set_coverage_pc_buffer(uintptr_t *buffer, uintptr_t length);
+ // Number of pcs recorded in the buffer.
+ // Reset by __sanitizer_reset_coverage();
+ uintptr_t __sanitizer_get_coverage_pc_buffer_pos();
+
#ifdef __cplusplus
} // extern "C"
#endif