This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[doc patch] invoke & gcov


Hi,
I've installed this obvious patch, which removes the documentation
about the now removed -a profiling option, and a gcov file note.

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2002-08-14  Nathan Sidwell  <nathan@codesourcery.com>

	* doc/invoke.texi (-a): Remove documentation.
	(-fprofile-arcs): Remove reference to -a, -ax options.
	* doc/gcov.texi (Gcov Data Files): Data might be merged.

Index: doc/gcov.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/gcov.texi,v
retrieving revision 1.10
diff -c -3 -p -r1.10 gcov.texi
*** doc/gcov.texi	4 Aug 2002 17:06:10 -0000	1.10
--- doc/gcov.texi	14 Aug 2002 19:52:30 -0000
*************** built with the GCC @option{-fprofile-arc
*** 464,473 ****
  separate @file{.da} file is created for each source file compiled with
  this option, and the name of the @file{.da} file is stored as an
  absolute pathname in the resulting object file.  This path name is
! derived from the source file name by substituting a @file{.da} suffix.
  
! The @file{.da} consists of several blocks (one for each run) with the
! following structure:
  @smallexample
          "magic" number @minus{}123 (4-byte number)
  	number of functions (4-byte number)
--- 464,473 ----
  separate @file{.da} file is created for each source file compiled with
  this option, and the name of the @file{.da} file is stored as an
  absolute pathname in the resulting object file.  This path name is
! derived from the object file name by substituting a @file{.da} suffix.
  
! The @file{.da} consists of one or more blocks with the following
! structure:
  @smallexample
          "magic" number @minus{}123 (4-byte number)
  	number of functions (4-byte number)
*************** following structure:
*** 484,490 ****
          checksum of function #1
  	@dots{}
  @end smallexample
! The current structure of the extension block is as follows:
  @smallexample
          number of instrumented arcs in whole program (4-byte number)
          sum all of instrumented arcs in whole program (8-byte number)
--- 484,492 ----
          checksum of function #1
  	@dots{}
  @end smallexample
! Multiple program runs might merge data into a single block, or might
! append a new block. The current structure of the extension block is as
! follows:
  @smallexample
          number of instrumented arcs in whole program (4-byte number)
          sum all of instrumented arcs in whole program (8-byte number)
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.172
diff -c -3 -p -r1.172 invoke.texi
*** doc/invoke.texi	14 Aug 2002 07:53:54 -0000	1.172
--- doc/invoke.texi	14 Aug 2002 19:52:57 -0000
*************** analysis program @code{gprof}.  You must
*** 2795,2814 ****
  the source files you want data about, and you must also use it when
  linking.
  
- @cindex @code{tcov}
- @item -a
- @opindex a
- Generate extra code to write profile information for basic blocks, which will
- record the number of times each basic block is executed, the basic block start
- address, and the function name containing the basic block.  If @option{-g} is
- used, the line number and filename of the start of the basic block will also be
- recorded.  If not overridden by the machine description, the default action is
- to append to the text file @file{bb.out}.
- 
- This data could be analyzed by a program like @code{tcov}.  Note,
- however, that the format of the data is not what @code{tcov} expects.
- Eventually GNU @code{gprof} should be extended to process this data.
- 
  @item -Q
  @opindex Q
  Makes the compiler print out each function name as it is compiled, and
--- 2795,2800 ----
*************** optimization and code generation options
*** 2846,2863 ****
  Control Optimization}).
  
  The other use of @option{-fprofile-arcs} is for use with @code{gcov},
! when it is used with the @option{-ftest-coverage} option.  GCC
! supports two methods of determining code coverage: the options that
! support @code{gcov}, and options @option{-a} and @option{-ax}, which
! write information to text files.  The options that support @code{gcov}
! do not need to instrument every arc in the program, so a program compiled
! with them runs faster than a program compiled with @option{-a}, which
! adds instrumentation code to every basic block in the program.  The
! tradeoff: since @code{gcov} does not have execution counts for all
! branches, it must start with the execution counts for the instrumented
! branches, and then iterate over the program flow graph until the entire
! graph has been solved.  Hence, @code{gcov} runs a little more slowly than
! a program which uses information from @option{-a} and @option{-ax}.
  
  With @option{-fprofile-arcs}, for each function of your program GCC
  creates a program flow graph, then finds a spanning tree for the graph.
--- 2832,2838 ----
  Control Optimization}).
  
  The other use of @option{-fprofile-arcs} is for use with @code{gcov},
! when it is used with the @option{-ftest-coverage} option.
  
  With @option{-fprofile-arcs}, for each function of your program GCC
  creates a program flow graph, then finds a spanning tree for the graph.
*************** compiler adds code to count the number o
*** 2866,2876 ****
  executed.  When an arc is the only exit or only entrance to a block, the
  instrumentation code can be added to the block; otherwise, a new basic
  block must be created to hold the instrumentation code.
- 
- This option makes it possible to estimate branch probabilities and to
- calculate basic block execution counts.  In general, basic block
- execution counts as provided by @option{-a} do not give enough
- information to estimate all branch probabilities.
  
  @need 2000
  @item -ftest-coverage
--- 2841,2846 ----

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]