Lines Matching +full:html +full:- +full:export
1 llvm-cov - emit coverage information
4 .. program:: llvm-cov
7 --------
9 :program:`llvm-cov` *command* [*args...*]
12 -----------
14 The :program:`llvm-cov` tool shows code coverage information for
16 work with ``gcov``\-style coverage or with ``clang``\'s instrumentation
20 the :program:`llvm-cov gcov` command were called. Otherwise, a command should
24 --------
26 * :ref:`gcov <llvm-cov-gcov>`
27 * :ref:`show <llvm-cov-show>`
28 * :ref:`report <llvm-cov-report>`
29 * :ref:`export <llvm-cov-export>`
31 .. program:: llvm-cov gcov
33 .. _llvm-cov-gcov:
36 ------------
41 :program:`llvm-cov gcov` [*options*] *SOURCEFILE*
46 The :program:`llvm-cov gcov` tool reads code coverage data files and displays
51 To use :program:`llvm-cov gcov`, you must first build an instrumented version
53 ``-fprofile-arcs`` and ``-ftest-coverage`` options to add the
54 instrumentation. (Alternatively, you can use the ``--coverage`` option, which
74 where :program:`llvm-cov gcov` expects to find them.
76 Once you have generated the coverage data files, run :program:`llvm-cov gcov`
85 count is shown as ``-`` if a line does not contain any executable code. If
92 .. option:: -a, --all-blocks
95 source code, this option causes llvm-cov to show the count for each block
98 .. option:: -b, --branch-probabilities
102 .. option:: -c, --branch-counts
104 Display branch counts instead of probabilities (requires -b).
106 .. option:: -m, --demangled-names
110 .. option:: -f, --function-summaries
115 .. option:: --help
117 Display available options (--help-hidden for more).
119 .. option:: -l, --long-file-names
123 can be combined with the --preserve-paths option to use complete paths for
126 .. option:: -n, --no-output
131 .. option:: -o <DIR|FILE>, --object-directory=<DIR>, --object-file=<FILE>
139 .. option:: -p, --preserve-paths
145 the --long-file-names option, this applies to both the main file name and the
148 .. option:: -r
151 by ``-s``.
153 .. option:: -s <string>
157 .. option:: -t, --stdout
161 .. option:: -u, --unconditional-branches
163 Include unconditional branches in the output for the --branch-probabilities
166 .. option:: -version
168 Display the version of llvm-cov.
170 .. option:: -x, --hash-filenames
178 :program:`llvm-cov gcov` returns 1 if it cannot read input files. Otherwise,
181 .. program:: llvm-cov show
183 .. _llvm-cov-show:
186 ------------
191 :program:`llvm-cov show` [*options*] -instr-profile *PROFILE* [*BIN*] [*-object BIN*]... [*-sources…
196 The :program:`llvm-cov show` command shows line by line coverage of the
203 To use :program:`llvm-cov show`, you need a program that is compiled with
205 ``clang`` use the ``-fprofile-instr-generate`` and ``-fcoverage-mapping``
206 flags. If linking with the ``clang`` driver, pass ``-fprofile-instr-generate``
210 and this is what you should pass to :program:`llvm-cov show` as a *BIN*
214 is suitable for the *PROFILE* argument using the :program:`llvm-profdata merge`
220 .. option:: -show-branches=<VIEW>
225 .. option:: -show-mcdc
230 .. option:: -show-line-counts
233 ``-show`` option is used.
235 .. option:: -show-expansions
240 .. option:: -show-instantiations
246 .. option:: -show-regions
251 .. option:: -show-line-counts-or-regions
257 .. option:: -show-directory-coverage
262 .. option:: -use-color
266 .. option:: -arch=[*NAMES*]
272 architecture that does not match a non-universal binary.
274 .. option:: -name=<NAME>
278 .. option:: -name-allowlist=<FILE>
284 .. option:: -name-regex=<PATTERN>
288 .. option:: -ignore-filename-regex=<PATTERN>
292 .. option:: -format=<FORMAT>
294 Use the specified output format. The supported formats are: "text", "html".
296 .. option:: -tab-size=<TABSIZE>
299 only supported for the html format.
301 .. option:: -output-dir=PATH
304 exist, it is created. When used in function view mode (i.e when -name or
305 -name-regex are used to select specific functions), the report is written to
309 .. option:: -Xdemangler=<TOOL>|<TOOL-OPTION>
312 human-readable. This option can be specified multiple times to supply
313 arguments to the demangler (e.g `-Xdemangler c++filt -Xdemangler -n` for C++).
314 The demangler is expected to read a newline-separated list of symbols from
315 stdin and write a newline-separated list of the same length to stdout.
317 .. option:: -num-threads=N, -j=N
319 Use N threads to write file reports (only applicable when -output-dir is
320 specified). When N=0, llvm-cov auto-detects an appropriate number of threads to
323 .. option:: -compilation-dir=<dir>
326 when binaries have been compiled with one of `-fcoverage-prefix-map`
327 `-fcoverage-compilation-dir`, or `-ffile-compilation-dir`.
329 .. option:: -line-coverage-gt=<N>
334 .. option:: -line-coverage-lt=<N>
339 .. option:: -region-coverage-gt=<N>
344 .. option:: -region-coverage-lt=<N>
349 .. option:: -path-equivalence=<from>,<to>
352 to generate the coverage data on one machine, and then use llvm-cov on a
354 `-path-equivalence` arguments can be passed to specify different mappings. Each
359 .. option:: -coverage-watermark=<high>,<low>
361 Set high and low watermarks for coverage in html format output. This allows you
364 low should be between 0-100 and high > low.
366 .. option:: -debuginfod
373 .. option:: -debug-file-directory=<dir>
378 .. option:: -check-binary-ids
383 .. program:: llvm-cov report
385 .. _llvm-cov-report:
388 --------------
393 :program:`llvm-cov report` [*options*] -instr-profile *PROFILE* [*BIN*] [*-object BIN*]... [*-sourc…
398 The :program:`llvm-cov report` command displays a summary of the coverage of
407 function in the listed files if the ``-show-functions`` option is enabled.
410 see :ref:`llvm-cov-show`.
415 .. option:: -use-color[=VALUE]
419 .. option:: -arch=<name>
424 non-universal binary.
426 .. option:: -show-region-summary
430 .. option:: -show-branch-summary
434 .. option:: -show-mcdc-summary
438 .. option:: -show-functions
442 .. option:: -show-instantiation-summary
446 .. option:: -ignore-filename-regex=<PATTERN>
450 .. option:: -compilation-dir=<dir>
453 when binaries have been compiled with one of `-fcoverage-prefix-map`
454 `-fcoverage-compilation-dir`, or `-ffile-compilation-dir`.
456 .. option:: -debuginfod
463 .. option:: -debug-file-directory=<dir>
468 .. option:: -check-binary-ids
473 .. program:: llvm-cov export
475 .. _llvm-cov-export:
477 EXPORT COMMAND
478 --------------
483 :program:`llvm-cov export` [*options*] -instr-profile *PROFILE* [*BIN*] [*-object BIN*]... [*-sourc…
488 The :program:`llvm-cov export` command exports coverage data of the binaries
494 file, the line-based coverage, branch coverage, and summaries will be exported.
496 The exported data can optionally be filtered to only export the coverage
500 see :ref:`llvm-cov-show`.
505 .. option:: -arch=<name>
510 non-universal binary.
512 .. option:: -format=<FORMAT>
517 .. option:: -summary-only
519 Export only summary information for each file in the coverage data. This mode
520 will not export coverage information for smaller units such as individual
522 by the :program:`llvm-cov report` command, but presented in JSON or lcov
525 .. option:: -ignore-filename-regex=<PATTERN>
529 .. option:: -skip-expansions
533 .. option:: -skip-functions
535 Skip exporting per-function coverage data.
537 .. option:: -num-threads=N, -j=N
539 Use N threads to export coverage data. When N=0, llvm-cov auto-detects an
542 .. option:: -compilation-dir=<dir>
545 when binaries have been compiled with one of `-fcoverage-prefix-map`
546 `-fcoverage-compilation-dir`, or `-ffile-compilation-dir`.
548 .. option:: -debuginfod
555 .. option:: -debug-file-directory=<dir>
560 .. option:: -check-binary-ids
565 CONVERT-FOR-TESTING COMMAND
566 ---------------------------
569 This command is for the LLVM developers who are working on ``llvm-cov`` only.
574 :program:`llvm-cov convert-for-testing` *BIN* -o *OUT*
579 The :program:`llvm-cov convert-for-testing` command serves the purpose of
580 testing `llvm-cov` itself. It can extract all code coverage data from the
584 The :program:`.covmapping` files can be read back by ``llvm-cov`` just as