delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/12/24/10:18:44

Message-ID: <36827716.5AA8184@gmx.net>
Date: Thu, 24 Dec 1998 16:17:10 -0100
From: Robert Hoehne <robert DOT hoehne AT gmx DOT net>
Organization: none provided
X-Mailer: Mozilla 4.07 [de] (Win95; I)
MIME-Version: 1.0
To: Peter Palotas <blizzar AT hem1 DOT passagen DOT se>
CC: djgpp-workers <djgpp-workers AT delorie DOT com>,
DJGPP Mailing list <djgpp AT delorie DOT com>
Subject: Re: Profiling Problems.
References: <3 DOT 0 DOT 16 DOT 19981219193038 DOT 3aef114e AT hem1 DOT passagen DOT se>
Reply-To: djgpp-workers 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 <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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019