[Ilugc] Profiling a C program.

  • From: logulinux@xxxxxxx (Logu)
  • Date: Thu Mar 13 00:00:59 2008

I am trying to profile a simple C program, but I am not getting correct 
values under the  "cumulative seconds"  and "self seconds" column for the 
functions. I always get them as 0.00.

I compiled and linked the program with -pg option. But when I run the gprof 
I only get this output

  %   cumulative   self         self     total
 time   seconds   seconds    calls   Ts/call  Ts/call  name
  0.00      0.00     0.00        5        0.00     0.00    pmesg

Could someone point me what I am missing here. I need to find the time spent 
on each function calls.

Thanks
-logu 


Other related posts: