Message-ID: <36827716.5AA8184@gmx.net> Date: Thu, 24 Dec 1998 16:17:10 -0100 From: Robert Hoehne Organization: none provided X-Mailer: Mozilla 4.07 [de] (Win95; I) MIME-Version: 1.0 To: Peter Palotas CC: djgpp-workers , DJGPP Mailing list Subject: Re: Profiling Problems. References: <3 DOT 0 DOT 16 DOT 19981219193038 DOT 3aef114e AT hem1 DOT passagen DOT se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com 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 * * Post: Am Berg 3, D-09573 Dittmannsdorf, Germany * * WWW: http://www.tu-chemnitz.de/~sho/rho * ******************************************************