This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gprof - output
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Ian Lance Taylor <ian at wasabisystems dot com>
- Cc: binutils at sources dot redhat dot com, bug-binutils at gnu dot org, Rajesh Munavalli <munavallirv at ornl dot gov>
- Date: Tue, 30 Mar 2004 11:42:03 +0200
- Subject: Re: gprof - output
- References: <1080578754.2165.7.camel@capricorn.csm.ornl.gov> <m3fzbroan9.fsf@gossamer.airs.com>
You are reading the results incorrectly. Your use of clock is
measuring what the gprof output describes as "cumulative seconds".
Actually, "cumulative seconds" is just the time taken by a function
(without its kids!) and all functions that took longer (are above it
in the table), added together.
Pretty useless, unless you want to see something like "what is the
minimum number of functions that together make up for 50% of
execution time". If it's a lot of-em, you'll have a hard time
getting the program to run significantly faster ;-)
Segher