This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Gprof can account for less than 1/3 of execution time?!?!


I have recently encountered a gross inaccuracy in gprof that
I can't explain. Yes, I know gprof uses a sampling technique
so I should not expect a high level of precision, but the results
I am getting clearly reflect a more fundamental issue.

The program in question has been compiled with -pg for all
source code files. The time command reports 20 seconds of user
time (which is consistent with personal observation) but
the gprof output accounts for only about 6 seconds of the
execution time. I have eliminated all IO from the program,
and the results remain consistent.

Gprof is sampling the program every 10 ms, so in the observed
20 seconds of execution time, it should be taking 2000 samples,
which should be enough to avoid any grows inconsistencies.

Any ideas would be appreciated.

Jon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]