man geninfo (Commandes) - Generate tracefiles from .da files

NAME

geninfo - Generate tracefiles from .da files

SYNOPSIS

geninfo [-h|--help] [-v|--version]

[-q|--quiet] [-f|--follow]

[-g|--gcov-tool gcov-tool]

[-t|--test-name test-name]

[-o|--output-filename output-filename]

[--no-checksum]

directory

DESCRIPTION

geninfo converts all GCOV coverage data files found in directory into tracefiles, which the genhtml tool can convert to HTML output.

Unless the --output-filename option is specified, geninfo writes its output to one file per .da file, the name of which is generated by simply appending ".info" to the respective .da file name.

Note that the current user needs write access to both directory as well as to the original source code location. This is necessary because some temporary files have to be created there during the conversion process.

Note also that geninfo is called from within lcov, so that there is usually no need to call it directly.

OPTIONS

-h

--help Print a short help text, then exit.

-v

--version Print version number, then exit.

-q

--quiet Do not print progress messages.

Suppresses all informational progress output. When this switch is enabled, only error or warning messages are printed.

-f

--follow Follow links when searching .da files.

-g tool

--gcov-tool tool Use a different version of gcov than the default /usr/bin/gcov



-t testname

--test-name testname Use test case name testname for resulting data.

This proves useful when data from several test cases is merged (i.e. by simply concatenating the respective tracefiles) in which case a test name can be used to differentiate between data from each test case.

-o output-filename

--output-filename output-filename Write all data to output-filename.

If you want to have all data written to a single file (for easier handling), use this option to specify the respective filename. By default, one tracefile will be created for each processed .da file.

--no-checksum Do not generate checksum data when writing tracefiles. By default, each line of coverage data is associated with a checksum of the corresponding source code line. This checksum is used to prevent merging coverage data from incompatible source code versions. Use this option to suppress generating such checksums for tracefiles.

This option can also be configured permanently using the configuration file option geninfo_no_checksum.

FILES

/etc/lcovrc The systemwide configuration file.

~/.lcovrc The per-user configuration file.

Following is a quick description of the tracefile format as used by genhtml, geninfo and lcov.

A tracefile is made up of several human-readable lines of text, divided into sections. If available, a tracefile begins with the testname which is stored in the following format:

TN:<test name>

For each source file referenced in the .da file, there is a section containing filename and coverage data:

SF:<absolute path to the source file>

Following is a list of line numbers for each function name found in the source file:

FN:<line number of function start>,<function name>

Then there is a list of execution counts for each instrumented line (i.e. a line which resulted in executable code):

DA:<line number>,<execution count>[,<checksum>]

Note that there may be an optional checksum present for each instrumented line. The current geninfo implementation uses an MD5 hash as checksumming algorithm.

At the end of a section, there is a summary about how many lines were found and how many were actually instrumented:

LH:<number of lines with a non-zero execution count> LF:<number of instrumented lines>

Each sections ends with:

end_of_record

In addition to the main source code file there are sections for all #included files which also contain executable code.

Note that the absolute path of a source file is generated by interpreting the contents of the respective .bb file (see gcov (1) for more information on this file type). Relative filenames are prefixed with the directory in which the .bb file is found.

Note also that symbolic links to the .bb file will be resolved so that the actual file path is used instead of the path to a link. This approach is necessary for the mechanism to work with the /proc/gcov files.

AUTHOR

Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>

SEE ALSO