This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gprof, ITIMER_PROF
- From: Kris Demuynck <Kris dot Demuynck at esat dot kuleuven dot ac dot be>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 3 Sep 2004 22:43:16 +0200 (CEST)
- Subject: gprof, ITIMER_PROF
Hello,
With our current installation of linux/gcc/libc (specifications, see
below), gprof does no longer function correctly.
In the best case, gprof reports the actual timings x10. The reason seems
to be that the ITIMER_PROF interval timer is set to 999usec instead of
9999usec.
The main problem is not the factor 10 (my math is still that good), but
the overflow of the 16 bit counters gprof uses to derive it statistics. If
a program contains a single hot-spot, the counter may overflow from the
moment the program takes longer than 65536*1msec = 1min 5sec. This renders
gprof useless for all but the simplest programs.
Details of the system used:
gcc: 3.4.1
kernel: 2.6.7-1.494.2.2smp
libc: GNU C Library stable release version 2.3.3
gprof: GNU gprof 2.15.90.0.3
Regards,
Kris Demuynck.