summaryrefslogtreecommitdiffstats
path: root/usr.bin/clang/llvm-cov/llvm-cov.1
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/clang/llvm-cov/llvm-cov.1')
-rw-r--r--usr.bin/clang/llvm-cov/llvm-cov.1136
1 files changed, 115 insertions, 21 deletions
diff --git a/usr.bin/clang/llvm-cov/llvm-cov.1 b/usr.bin/clang/llvm-cov/llvm-cov.1
index 07c4000..2f573ce 100644
--- a/usr.bin/clang/llvm-cov/llvm-cov.1
+++ b/usr.bin/clang/llvm-cov/llvm-cov.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-COV" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-COV" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-cov \- emit coverage information
.
@@ -52,6 +52,8 @@ be provided.
\fI\%show\fP
.IP \(bu 2
\fI\%report\fP
+.IP \(bu 2
+\fI\%export\fP
.UNINDENT
.SH GCOV COMMAND
.SS SYNOPSIS
@@ -183,12 +185,12 @@ it exits with zero.
.SH SHOW COMMAND
.SS SYNOPSIS
.sp
-\fBllvm\-cov show\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fISOURCES\fP]
+\fBllvm\-cov show\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fI\-object BIN,...\fP] [[\fI\-object BIN\fP]] [\fISOURCES\fP]
.SS DESCRIPTION
.sp
-The \fBllvm\-cov show\fP command shows line by line coverage of a binary
-\fIBIN\fP using the profile data \fIPROFILE\fP\&. It can optionally be filtered to only
-show the coverage for the files listed in \fISOURCES\fP\&.
+The \fBllvm\-cov show\fP command shows line by line coverage of the
+binaries \fIBIN\fP,... using the profile data \fIPROFILE\fP\&. It can optionally be
+filtered to only show the coverage for the files listed in \fISOURCES\fP\&.
.sp
To use \fBllvm\-cov show\fP, you need a program that is compiled with
instrumentation to emit profile and coverage data. To build such a program with
@@ -197,7 +199,7 @@ flags. If linking with the \fBclang\fP driver, pass \fB\-fprofile\-instr\-genera
to the link stage to make sure the necessary runtime libraries are linked in.
.sp
The coverage information is stored in the built executable or library itself,
-and this is what you should pass to \fBllvm\-cov show\fP as the \fIBIN\fP
+and this is what you should pass to \fBllvm\-cov show\fP as a \fIBIN\fP
argument. The profile data is generated by running this instrumented program
normally. When the program exits it will write out a raw profile file,
typically called \fBdefault.profraw\fP, which can be converted to a format that
@@ -207,45 +209,48 @@ tool.
.INDENT 0.0
.TP
.B \-show\-line\-counts
-Show the execution counts for each line. This is enabled by default, unless
-another \fB\-show\fP option is used.
+Show the execution counts for each line. Defaults to true, unless another
+\fB\-show\fP option is used.
.UNINDENT
.INDENT 0.0
.TP
.B \-show\-expansions
Expand inclusions, such as preprocessor macros or textual inclusions, inline
-in the display of the source file.
+in the display of the source file. Defaults to false.
.UNINDENT
.INDENT 0.0
.TP
.B \-show\-instantiations
For source regions that are instantiated multiple times, such as templates in
\fBC++\fP, show each instantiation separately as well as the combined summary.
+Defaults to true.
.UNINDENT
.INDENT 0.0
.TP
.B \-show\-regions
Show the execution counts for each region by displaying a caret that points to
-the character where the region starts.
+the character where the region starts. Defaults to false.
.UNINDENT
.INDENT 0.0
.TP
.B \-show\-line\-counts\-or\-regions
Show the execution counts for each line if there is only one region on the
line, but show the individual regions if there are multiple on the line.
+Defaults to false.
.UNINDENT
.INDENT 0.0
.TP
-.B \-use\-color[=VALUE]
+.B \-use\-color
Enable or disable color output. By default this is autodetected.
.UNINDENT
.INDENT 0.0
.TP
-.B \-arch=<name>
-If the covered binary is a universal binary, select the architecture to use.
-It is an error to specify an architecture that is not included in the
-universal binary or to use an architecture that does not match a
-non\-universal binary.
+.B \-arch=[*NAMES*]
+Specify a list of architectures such that the Nth entry in the list
+corresponds to the Nth specified binary. If the covered object is a universal
+binary, this specifies the architecture to use. It is an error to specify an
+architecture that is not included in the universal binary or to use an
+architecture that does not match a non\-universal binary.
.UNINDENT
.INDENT 0.0
.TP
@@ -254,11 +259,54 @@ Show code coverage only for functions with the given name.
.UNINDENT
.INDENT 0.0
.TP
+.B \-name\-whitelist=<FILE>
+Show code coverage only for functions listed in the given file. Each line in
+the file should start with \fIwhitelist_fun:\fP, immediately followed by the name
+of the function to accept. This name can be a wildcard expression.
+.UNINDENT
+.INDENT 0.0
+.TP
.B \-name\-regex=<PATTERN>
Show code coverage only for functions that match the given regular expression.
.UNINDENT
.INDENT 0.0
.TP
+.B \-format=<FORMAT>
+Use the specified output format. The supported formats are: "text", "html".
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-tab\-size=<TABSIZE>
+Replace tabs with <TABSIZE> spaces when preparing reports. Currently, this is
+only supported for the html format.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-output\-dir=PATH
+Specify a directory to write coverage reports into. If the directory does not
+exist, it is created. When used in function view mode (i.e when \-name or
+\-name\-regex are used to select specific functions), the report is written to
+PATH/functions.EXTENSION. When used in file view mode, a report for each file
+is written to PATH/REL_PATH_TO_FILE.EXTENSION.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-Xdemangler=<TOOL>|<TOOL\-OPTION>
+Specify a symbol demangler. This can be used to make reports more
+human\-readable. This option can be specified multiple times to supply
+arguments to the demangler (e.g \fI\-Xdemangler c++filt \-Xdemangler \-n\fP for C++).
+The demangler is expected to read a newline\-separated list of symbols from
+stdin and write a newline\-separated list of the same length to stdout.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-num\-threads=N, \-j=N
+Use N threads to write file reports (only applicable when \-output\-dir is
+specified). When N=0, llvm\-cov auto\-detects an appropriate number of threads to
+use. This is the default.
+.UNINDENT
+.INDENT 0.0
+.TP
.B \-line\-coverage\-gt=<N>
Show code coverage only for functions with line coverage greater than the
given threshold.
@@ -281,15 +329,22 @@ given threshold.
Show code coverage only for functions with region coverage less than the given
threshold.
.UNINDENT
+.INDENT 0.0
+.TP
+.B \-path\-equivalence=<from>,<to>
+Map the paths in the coverage data to local source file paths. This allows you
+to generate the coverage data on one machine, and then use llvm\-cov on a
+different machine where you have the same files on a different path.
+.UNINDENT
.SH REPORT COMMAND
.SS SYNOPSIS
.sp
-\fBllvm\-cov report\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fISOURCES\fP]
+\fBllvm\-cov report\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fI\-object BIN,...\fP] [[\fI\-object BIN\fP]] [\fISOURCES\fP]
.SS DESCRIPTION
.sp
-The \fBllvm\-cov report\fP command displays a summary of the coverage of a
-binary \fIBIN\fP using the profile data \fIPROFILE\fP\&. It can optionally be filtered to
-only show the coverage for the files listed in \fISOURCES\fP\&.
+The \fBllvm\-cov report\fP command displays a summary of the coverage of
+the binaries \fIBIN\fP,... using the profile data \fIPROFILE\fP\&. It can optionally be
+filtered to only show the coverage for the files listed in \fISOURCES\fP\&.
.sp
If no source files are provided, a summary line is printed for each file in the
coverage data. If any files are provided, summaries are shown for each function
@@ -311,9 +366,48 @@ It is an error to specify an architecture that is not included in the
universal binary or to use an architecture that does not match a
non\-universal binary.
.UNINDENT
+.INDENT 0.0
+.TP
+.B \-show\-functions
+Show coverage summaries for each function. Defaults to false.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-show\-instantiation\-summary
+Show statistics for all function instantiations. Defaults to false.
+.UNINDENT
+.SH EXPORT COMMAND
+.SS SYNOPSIS
+.sp
+\fBllvm\-cov export\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fI\-object BIN,...\fP] [[\fI\-object BIN\fP]]
+.SS DESCRIPTION
+.sp
+The \fBllvm\-cov export\fP command exports regions, functions, expansions,
+and summaries of the coverage of the binaries \fIBIN\fP,... using the profile data
+\fIPROFILE\fP as JSON.
+.sp
+For information on compiling programs for coverage and generating profile data,
+see \fI\%SHOW COMMAND\fP\&.
+.SS OPTIONS
+.INDENT 0.0
+.TP
+.B \-arch=<name>
+If the covered binary is a universal binary, select the architecture to use.
+It is an error to specify an architecture that is not included in the
+universal binary or to use an architecture that does not match a
+non\-universal binary.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-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:
+\fIllvm\-cov report\fP command, but presented in JSON format rather than text.
+.UNINDENT
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
OpenPOWER on IntegriCloud