Upload Tizen:Base source
[external/binutils.git] / debian / patches / 002_gprof_profile_arcs.patch
1 Author: Chris Chimelis <chris@debian.org>
2 Description: Add more documentation about profiling and -fprofile-arcs.
3 --- a/gprof/gprof.texi
4 +++ b/gprof/gprof.texi
5 @@ -149,6 +149,10 @@
6  If more than one profile file is specified, the @code{gprof}
7  output shows the sum of the profile information in the given profile files.
8  
9 +If you use gcc 2.95.x or 3.0 to compile your binaries, you may need
10 +to add the @samp{-fprofile-arcs} to the compile command line in order
11 +for the call graphs to be properly stored in gmon.out.
12 +
13  @code{Gprof} calculates the amount of time spent in each routine.
14  Next, these times are propagated along the edges of the call graph.
15  Cycles are discovered, and calls into a cycle are made to share the time
16 @@ -280,6 +284,11 @@
17  options.  The same option, @samp{-pg}, alters either compilation or linking
18  to do what is necessary for profiling.  Here are examples:
19  
20 +If you use gcc 2.95.x or 3.0.x, you may need to add the
21 +@samp{-fprofile-arcs} option to the compile line along with @samp{-pg}
22 +in order to allow the call-graphs to be properly included in the gmon.out
23 +file.
24 +
25  @example
26  cc -g -c myprog.c utils.c -pg
27  cc -o myprog myprog.o utils.o -pg