help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with profiling


From: Christian Chrismann
Subject: Problems with profiling
Date: Sat, 12 Aug 2006 19:21:30 +0200

Hi,

I'm using gprof to profile my application that consists of several
libraries. All libraries and the executable have been compiled
with the parameter "-pg". My problem is that the generated output
by gprof does not indicate functions that actually consume most 
of the program execution time.

Before I started using gprof, I compiled my application (wihtout "-pg")
in two version. The first version contained the function I assume most
run-time was spent at. In the second version I commented out this
function. Then I run the binary executables using the program "time".
The results of time confirm my assumptions. The first version has a
substantially larger "user" and "sys" (time) values than the second
version (without the costly function). This indicates that more resources
are required in the user and kernel space to run the first binary.

Then I wanted to obtain more accurate information, so I decided to use
"gprof". However, the generated output of "gprof" together with my
first program version (with the expensive function) does not contain any
entry for that function. Why? It is apparent that this function is
responsible for the increased program execution time. 

I also tries to run gprof with the option "-f functionname" (where
functionname is the function that increases the execution time) to
limit the call graph to this function. But even then, the name of that
function is missing in gprof's output.

Do you have any ideas what might be wrong?

Regards,
Chris


reply via email to

[Prev in Thread] Current Thread [Next in Thread]