File: 002_gprof_profile_arcs.patch

package info (click to toggle)
binutils 2.45-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 408,956 kB
  • sloc: ansic: 1,465,081; asm: 816,463; cpp: 87,135; exp: 79,234; makefile: 67,950; sh: 20,839; yacc: 14,149; lisp: 13,640; perl: 13,404; lex: 1,714; ada: 1,681; pascal: 1,446; cs: 879; python: 630; java: 478; sed: 191; xml: 95; awk: 25
file content (27 lines) | stat: -rw-r--r-- 1,261 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Author: Chris Chimelis <chris@debian.org>
Description: Add more documentation about profiling and -fprofile-arcs.
--- a/gprof/gprof.texi
+++ b/gprof/gprof.texi
@@ -145,6 +145,10 @@ its symbol table and the call graph prof
 If more than one profile file is specified, the @code{gprof}
 output shows the sum of the profile information in the given profile files.
 
+If you use gcc 2.95.x or 3.0 to compile your binaries, you may need
+to add the @samp{-fprofile-arcs} to the compile command line in order
+for the call graphs to be properly stored in gmon.out.
+
 @code{Gprof} calculates the amount of time spent in each routine.
 Next, these times are propagated along the edges of the call graph.
 Cycles are discovered, and calls into a cycle are made to share the time
@@ -276,6 +280,11 @@ to do the linking, simply specify @samp{
 options.  The same option, @samp{-pg}, alters either compilation or linking
 to do what is necessary for profiling.  Here are examples:
 
+If you use gcc 2.95.x or 3.0.x, you may need to add the
+@samp{-fprofile-arcs} option to the compile line along with @samp{-pg}
+in order to allow the call-graphs to be properly included in the gmon.out
+file.
+
 @example
 cc -g -c myprog.c utils.c -pg
 cc -o myprog myprog.o utils.o -pg