Mail Archives: djgpp-workers/1998/12/24/10:18:44
Peter Palotas wrote :
>
> I'm having problems profiling my programs. I'm using the beta version of
> egcs-1.1.1, and binutils 2.8.1. I compile and link my programs with the
> -pg switch. But whenever I profile a program using gprof test.exe it
> reports that the first function listed in the profile list takes 0.06
> seconds, and 100% of the program time. All other functions are reported to
> take 0.00 seconds. This goes for all of the programs I have tested. One of
> them made calculations for 1.5 minutes, and it still only reported that all
> functions took 0.00 seconds to execute. If I put a sleep() call in a
> function it still takes 0.00 seconds to execute according to gprof.
>
> If anyone could help me with this I would really appreciate it, because I
> would like to be able to profile my programs.
This seems to be a very strange bug introduced in DJGPP 2.02.
I have seen this too already for some time but thought it was
in my program. Now I tested it and found, if you use the itimer.c
from DJGPP 2.01 instead the one from DJGPP 2.02 then the bug is
gone.
With the DJGPP 2.02 version I found, that the mcount_tick() function
from src/libc/crt0/mcount.c is called only once so there is something
wrong with the signal handling code in src/libc/posix/signal/itimer.c.
Maybe Tom Demmer can check it and explain since he wrote most of the
new code in itimer.c.
Robert
--
******************************************************
* email: Robert Hoehne <robert DOT hoehne AT gmx DOT net> *
* Post: Am Berg 3, D-09573 Dittmannsdorf, Germany *
* WWW: http://www.tu-chemnitz.de/~sho/rho *
******************************************************
- Raw text -