summaryrefslogtreecommitdiff
path: root/binutils/patches/002_gprof_profile_arcs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/patches/002_gprof_profile_arcs.patch')
-rw-r--r--binutils/patches/002_gprof_profile_arcs.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/binutils/patches/002_gprof_profile_arcs.patch b/binutils/patches/002_gprof_profile_arcs.patch
new file mode 100644
index 0000000..7503927
--- /dev/null
+++ b/binutils/patches/002_gprof_profile_arcs.patch
@@ -0,0 +1,27 @@
+Author: Chris Chimelis <chris@debian.org>
+Description: Add more documentation about profiling and -fprofile-arcs.
+--- a/gprof/gprof.texi
++++ b/gprof/gprof.texi
+@@ -149,6 +149,10 @@
+ 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
+@@ -280,6 +284,11 @@
+ 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