LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   gprof problem (https://www.linuxquestions.org/questions/programming-9/gprof-problem-363971/)

bogdanpa 09-16-2005 01:02 PM

gprof problem
 
I'm trying to profile a program using gprof and the "time" columns are always 0, only the "calls" columns indicate something.
I've tried gprof with a simple program and it works fine, displaying results on both time and calls columns. In my real program I'm using signals, read from a comport and send some data through a pipe.
I can't figure out why gprof displays 0 on time columns.

Thanks.

btmiller 09-17-2005 02:29 PM

Probably a stupid question, but to be sure, did you compile your program with profiling support (i.e. with -pg as an argument to gcc)?

bogdanpa 09-19-2005 08:26 AM

" ...did you compile your program with profiling support (i.e. with -pg as an argument to gcc)?"
Yes, I did. I suspect there is something in my program that causes this behavior, because on a simple test program everything seems fine, the problem occurs only with my "real" program.
And I'm using gcc 3.3.4 on a slackware 10.0 if this is of any importance.
Thanks again


All times are GMT -5. The time now is 08:54 PM.