summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CommandGuide
diff options
context:
space:
mode:
authorMax Moroz <mmoroz@chromium.org>2018-11-09 16:10:44 +0000
committerMax Moroz <mmoroz@chromium.org>2018-11-09 16:10:44 +0000
commitb2091c930b765a1f1b75c9159f49329af59604f9 (patch)
tree2cd9a18678670d2096029b255a7577c73dd29bb0 /llvm/docs/CommandGuide
parent9cad24a7ee2e61c21b24da6326827bb7dbb04dde (diff)
downloadbcm5719-llvm-b2091c930b765a1f1b75c9159f49329af59604f9.tar.gz
bcm5719-llvm-b2091c930b765a1f1b75c9159f49329af59604f9.zip
[llvm-cov] Add lcov tracefile export format.
Summary: lcov tracefiles are used by various coverage reporting tools and build systems (e.g., Bazel). It is a simple text-based format to parse and more convenient to use than the JSON export format, which needs additional processing to map regions/segments back to line numbers. It's a little unfortunate that "text" format is now overloaded to refer specifically to JSON for export, but I wanted to avoid making any breaking changes to the UI of the llvm-cov tool at this time. Patch by Tony Allevato (@allevato). Reviewers: Dor1s, vsk Reviewed By: Dor1s, vsk Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D54266 llvm-svn: 346506
Diffstat (limited to 'llvm/docs/CommandGuide')
-rw-r--r--llvm/docs/CommandGuide/llvm-cov.rst22
1 files changed, 17 insertions, 5 deletions
diff --git a/llvm/docs/CommandGuide/llvm-cov.rst b/llvm/docs/CommandGuide/llvm-cov.rst
index 6f1b6e46c48..71924e997d9 100644
--- a/llvm/docs/CommandGuide/llvm-cov.rst
+++ b/llvm/docs/CommandGuide/llvm-cov.rst
@@ -374,9 +374,15 @@ SYNOPSIS
DESCRIPTION
^^^^^^^^^^^
-The :program:`llvm-cov export` command exports regions, functions, expansions,
-and summaries of the coverage of the binaries *BIN*,... using the profile data
-*PROFILE* as JSON. It can optionally be filtered to only export the coverage
+The :program:`llvm-cov export` command exports coverage data of the binaries
+*BIN*,... using the profile data *PROFILE* in either JSON or lcov trace file
+format.
+
+When exporting JSON, the regions, functions, expansions, and summaries of the
+coverage data will be exported. When exporting an lcov trace file, the
+line-based coverage and summaries will be exported.
+
+The exported data can optionally be filtered to only export the coverage
for the files listed in *SOURCES*.
For information on compiling programs for coverage and generating profile data,
@@ -392,12 +398,18 @@ OPTIONS
universal binary or to use an architecture that does not match a
non-universal binary.
+.. option:: -format=<FORMAT>
+
+ Use the specified output format. The supported formats are: "text" (JSON),
+ "lcov".
+
.. option:: -summary-only
Export only summary information for each file in the coverage data. This mode
will not export coverage information for smaller units such as individual
- functions or regions. The result will be the same as produced by :program:
- `llvm-cov report` command, but presented in JSON format rather than text.
+ functions or regions. The result will contain the same information as produced
+ by the :program:`llvm-cov report` command, but presented in JSON or lcov
+ format rather than text.
.. option:: -ignore-filename-regex=<PATTERN>
OpenPOWER on IntegriCloud