summaryrefslogtreecommitdiffstats
path: root/clang/docs/SanitizerCoverage.rst
diff options
context:
space:
mode:
authorSergey Matveev <earthdok@google.com>2015-05-06 21:09:00 +0000
committerSergey Matveev <earthdok@google.com>2015-05-06 21:09:00 +0000
commitea558e0b33f249b34fdcd99ed4bc1c718632273f (patch)
tree6e6fe602e5a3e83c1faa5f4525cddf9faa232703 /clang/docs/SanitizerCoverage.rst
parentba4b8b09177e9106bebaf7c22b0d34bcca92db65 (diff)
downloadbcm5719-llvm-ea558e0b33f249b34fdcd99ed4bc1c718632273f.tar.gz
bcm5719-llvm-ea558e0b33f249b34fdcd99ed4bc1c718632273f.zip
[docs] Update SanitizerCoverage docs.
llvm-svn: 236641
Diffstat (limited to 'clang/docs/SanitizerCoverage.rst')
-rw-r--r--clang/docs/SanitizerCoverage.rst18
1 files changed, 12 insertions, 6 deletions
diff --git a/clang/docs/SanitizerCoverage.rst b/clang/docs/SanitizerCoverage.rst
index a2d60ffdaf1..ebc637c58e1 100644
--- a/clang/docs/SanitizerCoverage.rst
+++ b/clang/docs/SanitizerCoverage.rst
@@ -96,15 +96,21 @@ numbers:
How good is the coverage?
=========================
-If you want to know what PCs are still not covered, you can get the list of all
-instrumented PCs and then subtract all covered PCs from it. You can use
-``objdump`` to get all instrumented PCs:
+It is possible to find out which PCs are not covered, by subtracting the covered
+set from the set of all instrumented PCs. The latter can be obtained by listing
+all callsites of ``__sanitizer_cov()`` in the binary. On Linux, ``sancov.py``
+can do this for you. Just supply the path to binary and a list of covered PCs:
.. code-block:: console
- % objdump -d ./your-binary | grep '__sanitizer_cov\>' | grep -o "^ *[0-9a-f]\+"
-
-TODO: implement scripts for doing this.
+ % sancov.py print a.out.12345.sancov > covered.txt
+ sancov.py: read 2 64-bit PCs from a.out.12345.sancov
+ sancov.py: 1 file merged; 2 PCs total
+ % sancov.py missing a.out < covered.txt
+ sancov.py: found 3 instrumented PCs in a.out
+ sancov.py: read 2 PCs from stdin
+ sancov.py: 1 PCs missing from coverage
+ 0x4cc61c
Edge coverage
=============
OpenPOWER on IntegriCloud