HI there,
I'm using a current version of Ubuntu server, with gcc 4.6.3 and gprof
2.22. I've been getting decidedly odd results in profiling a program; I'm
new to profiling, but I've looked at the info documentation, and this
doesn't seem to be mentioned.
The issue is that most of the execution time seems to be missing. I've
installed the libc-prof package to give me profiling libraries; I've used
-pg for both compiling and linking, and tried leaving out optimizations.
No change.
The program runs for over a minute, and (according to /usr/bin/time) is
roughly divided 50/50 between user and system, and running at 99% CPU.
However, the total CPU time reported in the flat profile is less than 10
seconds. Also, there's no mention of system calls (I use fread() quite a
bit, and would have thought that, or one of the related primitives, would
be mentioned somewhere...).
Am I missing something blindingly obvious, here? Any hints much
appreciated!
Thanks, and best wishes,
Nikhil.