From: Fangrui Song Date: Thu, 3 Jun 2021 19:36:27 +0000 (-0700) Subject: [docs] Update llvm-cov gcov X-Git-Tag: llvmorg-14-init~4935 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3fd40b955ecbb970883ea5f097fd919058432bd;p=platform%2Fupstream%2Fllvm.git [docs] Update llvm-cov gcov Mention some new options. Remove outdated information about -g and -O0. -g0 works. -O1/-O2/-O3 work. --- diff --git a/llvm/docs/CommandGuide/llvm-cov.rst b/llvm/docs/CommandGuide/llvm-cov.rst index d6e638f..98885d4 100644 --- a/llvm/docs/CommandGuide/llvm-cov.rst +++ b/llvm/docs/CommandGuide/llvm-cov.rst @@ -52,9 +52,7 @@ To use :program:`llvm-cov gcov`, you must first build an instrumented version of your application that collects coverage data as it runs. Compile with the ``-fprofile-arcs`` and ``-ftest-coverage`` options to add the instrumentation. (Alternatively, you can use the ``--coverage`` option, which -includes both of those other options.) You should compile with debugging -information (``-g``) and without optimization (``-O0``); otherwise, the -coverage data cannot be accurately mapped back to the source code. +includes both of those other options.) At the time you compile the instrumented code, a ``.gcno`` data file will be generated for each object file. These ``.gcno`` files contain half of the @@ -105,6 +103,10 @@ OPTIONS Display branch counts instead of probabilities (requires -b). +.. option:: -m, --demangled-names + + Demangle function names. + .. option:: -f, --function-summaries Show a summary of coverage for each function instead of just one summary for @@ -143,6 +145,19 @@ OPTIONS the --long-file-names option, this applies to both the main file name and the included file name. +.. option:: -r + + Only dump files with relative paths or absolute paths with the prefix specified + by ``-s``. + +.. option:: -s= + + Source prefix to elide. + +.. option:: -t, --stdout + + Print to stdout instead of producing ``.gcov`` files. + .. option:: -u, --unconditional-branches Include unconditional branches in the output for the --branch-probabilities