List Info

Thread: Problems with profiling




Problems with profiling
user name
2006-08-12 17:21:30
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
_______________________________________________
help-gnu-utils mailing list
help-gnu-utilsgnu.org

http://lists.gnu.org/mailman/listinfo/help-gnu-utils
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )