Commit 8100063e by Nathan Sidwell Committed by Nathan Sidwell

gcov.texi (Invoking Gcov): Describe output name mangling more fully.

	* doc/gcov.texi (Invoking Gcov): Describe output name mangling
	more fully.
	(Gcov Data Files): Update.

From-SVN: r70001
parent 515aab7c
2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
* doc/gcov.texi (Invoking Gcov): Describe output name mangling
more fully.
(Gcov Data Files): Update.
2003-07-31 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 2003-07-31 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config.gcc (alpha*-dec-osf[45]*): Enable POSIX thread support by * config.gcc (alpha*-dec-osf[45]*): Enable POSIX thread support by
......
...@@ -176,7 +176,9 @@ Create long file names for included source files. For example, if the ...@@ -176,7 +176,9 @@ Create long file names for included source files. For example, if the
header file @file{x.h} contains code, and was included in the file header file @file{x.h} contains code, and was included in the file
@file{a.c}, then running @command{gcov} on the file @file{a.c} will produce @file{a.c}, then running @command{gcov} on the file @file{a.c} will produce
an output file called @file{a.c##x.h.gcov} instead of @file{x.h.gcov}. an output file called @file{a.c##x.h.gcov} instead of @file{x.h.gcov}.
This can be useful if @file{x.h} is included in multiple source files. This can be useful if @file{x.h} is included in multiple source
files. If you uses the @samp{-p} option, both the including and
included file names will be complete path names.
@item -p @item -p
@itemx --preserve-paths @itemx --preserve-paths
...@@ -195,8 +197,8 @@ Output summaries for each function in addition to the file level summary. ...@@ -195,8 +197,8 @@ Output summaries for each function in addition to the file level summary.
@itemx --object-directory @var{directory} @itemx --object-directory @var{directory}
@itemx --object-file @var{file} @itemx --object-file @var{file}
Specify either the directory containing the gcov data files, or the Specify either the directory containing the gcov data files, or the
object path name. The @file{.bb}, @file{.bbg}, and object path name. The @file{.gcno}, and
@file{.da} data files are searched for using this option. If a directory @file{.gcda} data files are searched for using this option. If a directory
is specified, the data files are in that directory and named after the is specified, the data files are in that directory and named after the
source file name, without its extension. If a file is specified here, source file name, without its extension. If a file is specified here,
the data files are named after that file, without its extension. If this the data files are named after that file, without its extension. If this
...@@ -215,9 +217,13 @@ the source files. @command{gcov} produces files called ...@@ -215,9 +217,13 @@ the source files. @command{gcov} produces files called
@file{@var{mangledname}.gcov} in the current directory. These contain @file{@var{mangledname}.gcov} in the current directory. These contain
the coverage information of the source file they correspond to. the coverage information of the source file they correspond to.
One @file{.gcov} file is produced for each source file containing code, One @file{.gcov} file is produced for each source file containing code,
which was compiled to produce the data files. The @file{.gcov} files which was compiled to produce the data files. The @var{mangledname} part
contain the ':' separated fields along with program source code. The of the output file name is usually simply the source file name, but can
format is be something more complicated if the @samp{-l} or @samp{-p} options are
given. Refer to those options for details.
The @file{.gcov} files contain the ':' separated fields along with
program source code. The format is
@smallexample @smallexample
@var{execution_count}:@var{line_number}:@var{source line text} @var{execution_count}:@var{line_number}:@var{source line text}
...@@ -264,8 +270,8 @@ Here is a sample: ...@@ -264,8 +270,8 @@ Here is a sample:
@smallexample @smallexample
-: 0:Source:tmp.c -: 0:Source:tmp.c
-: 0:Graph:tmp.bbg -: 0:Graph:tmp.gcno
-: 0:Data:tmp.da -: 0:Data:tmp.gcda
-: 0:Runs:1 -: 0:Runs:1
-: 0:Programs:1 -: 0:Programs:1
-: 1:#include <stdio.h> -: 1:#include <stdio.h>
...@@ -293,8 +299,8 @@ counts, and the output looks like this: ...@@ -293,8 +299,8 @@ counts, and the output looks like this:
@smallexample @smallexample
-: 0:Source:tmp.c -: 0:Source:tmp.c
-: 0:Graph:tmp.bbg -: 0:Graph:tmp.gcno
-: 0:Data:tmp.da -: 0:Data:tmp.gcda
-: 0:Runs:1 -: 0:Runs:1
-: 0:Programs:1 -: 0:Programs:1
-: 1:#include <stdio.h> -: 1:#include <stdio.h>
...@@ -353,8 +359,8 @@ Here is a sample of a resulting @file{tmp.c.gcov} file: ...@@ -353,8 +359,8 @@ Here is a sample of a resulting @file{tmp.c.gcov} file:
@smallexample @smallexample
-: 0:Source:tmp.c -: 0:Source:tmp.c
-: 0:Graph:tmp.bbg -: 0:Graph:tmp.gcno
-: 0:Data:tmp.da -: 0:Data:tmp.gcda
-: 0:Runs:1 -: 0:Runs:1
-: 0:Programs:1 -: 0:Programs:1
-: 1:#include <stdio.h> -: 1:#include <stdio.h>
...@@ -464,18 +470,18 @@ many times the result was 1. ...@@ -464,18 +470,18 @@ many times the result was 1.
@command{gcov} uses two files for profiling. The names of these files @command{gcov} uses two files for profiling. The names of these files
are derived from the original @emph{object} file by substituting the are derived from the original @emph{object} file by substituting the
file suffix with either @file{.bbg}, or @file{.da}. All of these files file suffix with either @file{.gcno}, or @file{.gcda}. All of these files
are placed in the same directory as the object file, and contain data are placed in the same directory as the object file, and contain data
stored in a platform-independent format. stored in a platform-independent format.
The @file{.bbg} files is generated when the source file is compiled with The @file{.gcno} file is generated when the source file is compiled with
the GCC @option{-ftest-coverage} option. It contains information to the GCC @option{-ftest-coverage} option. It contains information to
reconstruct the basic block graphs and assign source line numbers to reconstruct the basic block graphs and assign source line numbers to
blocks. blocks.
The @file{.da} file is generated when a program containing object files The @file{.gcda} file is generated when a program containing object files
built with the GCC @option{-fprofile-arcs} option is executed. A built with the GCC @option{-fprofile-arcs} option is executed. A
separate @file{.da} file is created for each object file compiled with separate @file{.gcda} file is created for each object file compiled with
this option. It contains arc transition counts, and some summary this option. It contains arc transition counts, and some summary
information. information.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment