summaryrefslogtreecommitdiffstats
path: root/clang/docs/SanitizerCoverage.rst
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2017-08-25 19:29:47 +0000
committerKostya Serebryany <kcc@google.com>2017-08-25 19:29:47 +0000
commitd3e4b7e24a61f2cd81882ec120fbe00823266ebb (patch)
tree1c0eb7761514c06323f22538601384ba6961ec45 /clang/docs/SanitizerCoverage.rst
parent50a446ef10505fce65b56389af7c7e0f2e5f09b1 (diff)
downloadbcm5719-llvm-d3e4b7e24a61f2cd81882ec120fbe00823266ebb.tar.gz
bcm5719-llvm-d3e4b7e24a61f2cd81882ec120fbe00823266ebb.zip
[sanitizer-coverage] extend fsanitize-coverage=pc-table with flags for every PC
llvm-svn: 311794
Diffstat (limited to 'clang/docs/SanitizerCoverage.rst')
-rw-r--r--clang/docs/SanitizerCoverage.rst16
1 files changed, 9 insertions, 7 deletions
diff --git a/clang/docs/SanitizerCoverage.rst b/clang/docs/SanitizerCoverage.rst
index dbf4cc1509e..737f92866f6 100644
--- a/clang/docs/SanitizerCoverage.rst
+++ b/clang/docs/SanitizerCoverage.rst
@@ -148,19 +148,21 @@ With ``-fsanitize-coverage=pc-table`` the compiler will create a table of
instrumented PCs. Requires either ``-fsanitize-coverage=inline-8bit-counters`` or
``-fsanitize-coverage=trace-pc-guard``.
-Users need to implement a single function to capture the counters at startup:
+Users need to implement a single function to capture the PC table at startup:
.. code-block:: c++
extern "C"
- void __sanitizer_cov_pcs_init(const uint8_t *pcs_beg,
- const uint8_t *pcs_end) {
+ void __sanitizer_cov_pcs_init(const uintptr_t *pcs_beg,
+ const uintptr_t *pcs_end) {
// [pcs_beg,pcs_end) is the array of ptr-sized integers representing
- // PCs of the instrumented blocks in the current DSO.
- // Capture this array in order to read the PCs.
- // The number of PCs for a given DSO is the same as the number of
- // 8-bit counters (-fsanitize-coverage=inline-8bit-counters) or
+ // pairs [PC,PCFlags] for every instrumented block in the current DSO.
+ // Capture this array in order to read the PCs and their Flags.
+ // The number of PCs and PCFlags for a given DSO is the same as the number
+ // of 8-bit counters (-fsanitize-coverage=inline-8bit-counters) or
// trace_pc_guard callbacks (-fsanitize-coverage=trace-pc-guard)
+ // A PCFlags describes the basic block:
+ // * bit0: 1 if the block is the function entry block, 0 otherwise.
}
OpenPOWER on IntegriCloud