This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gcov] documentation
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 24 Jul 2003 13:15:22 +0100
- Subject: [gcov] documentation
- Organization: Codesourcery LLC
It appears I'd neglected to commit this documentation patch ...
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
* doc/invoke.texi (-fprofile-arcs, -ftest-coverage): Update
documentation missed from my 2003-07-09 patch.
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.322
diff -c -3 -p -r1.322 invoke.texi
*** doc/invoke.texi 21 Jul 2003 11:10:22 -0000 1.322
--- doc/invoke.texi 24 Jul 2003 11:46:29 -0000
*************** Add code so that program flow @dfn{arcs}
*** 3041,3054 ****
execution the program records how many times each branch and call is
executed and how many times it is taken or returns. When the compiled
program exits it saves this data to a file called
! @file{@var{auxname}.da} for each source file. The data may be used for
profile-directed optimizations (@option{-fbranch-probabilities}), or for
test coverage analysis (@option{-ftest-coverage}). Each object file's
@var{auxname} is generated from the name of the output file, if
explicitly specified and it is not the final executable, otherwise it is
the basename of the source file. In both cases any suffix is removed
! (e.g. @file{foo.da} for input file @file{dir/foo.c}, or
! @file{dir/foo.da} for output file specified as @option{-o dir/foo.o}).
@itemize
--- 3041,3054 ----
execution the program records how many times each branch and call is
executed and how many times it is taken or returns. When the compiled
program exits it saves this data to a file called
! @file{@var{auxname}.gcda} for each source file. The data may be used for
profile-directed optimizations (@option{-fbranch-probabilities}), or for
test coverage analysis (@option{-ftest-coverage}). Each object file's
@var{auxname} is generated from the name of the output file, if
explicitly specified and it is not the final executable, otherwise it is
the basename of the source file. In both cases any suffix is removed
! (e.g. @file{foo.gcda} for input file @file{dir/foo.c}, or
! @file{dir/foo.gcda} for output file specified as @option{-o dir/foo.o}).
@itemize
*************** Control Optimization}).
*** 3078,3084 ****
@item
For test coverage analysis, use @command{gcov} to produce human readable
! information from the @file{.bbg} and @file{.da} files. Refer to the
@command{gcov} documentation for further information.
@end itemize
--- 3078,3084 ----
@item
For test coverage analysis, use @command{gcov} to produce human readable
! information from the @file{.gcno} and @file{.gcda} files. Refer to the
@command{gcov} documentation for further information.
@end itemize
*************** block must be created to hold the instru
*** 3094,3103 ****
@need 2000
@item -ftest-coverage
@opindex ftest-coverage
! Produce a graph file that the @command{gcov} code-coverage utility
(@pxref{Gcov,, @command{gcov}---a Test Coverage Program}) can use to
! show program coverage. Each source file's data file is called
! @file{@var{auxname}.bbg}. Refer to the @option{-fprofile-arcs} option
above for a description of @var{auxname} and instructions on how to
generate test coverage data. Coverage data will match the source files
more closely, if you do not optimize.
--- 3094,3103 ----
@need 2000
@item -ftest-coverage
@opindex ftest-coverage
! Produce a notes file that the @command{gcov} code-coverage utility
(@pxref{Gcov,, @command{gcov}---a Test Coverage Program}) can use to
! show program coverage. Each source file's note file is called
! @file{@var{auxname}.gcno}. Refer to the @option{-fprofile-arcs} option
above for a description of @var{auxname} and instructions on how to
generate test coverage data. Coverage data will match the source files
more closely, if you do not optimize.
*************** After running a program compiled with @o
*** 4341,4347 ****
@option{-fbranch-probabilities}, to improve optimizations based on
the number of times each branch was taken. When the program
compiled with @option{-fprofile-arcs} exits it saves arc execution
! counts to a file called @file{@var{sourcename}.da} for each source
file The information in this data file is very dependent on the
structure of the generated code, so you must use the same source code
and the same optimization options for both compilations.
--- 4341,4347 ----
@option{-fbranch-probabilities}, to improve optimizations based on
the number of times each branch was taken. When the program
compiled with @option{-fprofile-arcs} exits it saves arc execution
! counts to a file called @file{@var{sourcename}.gcda} for each source
file The information in this data file is very dependent on the
structure of the generated code, so you must use the same source code
and the same optimization options for both compilations.