Mail Archives: djgpp/1993/03/15/11:33:06
DJ writes:
> Should I still produce one more fix release of the 1.0x
> series before
> going on to 2.0? I think so, and I'd like to collect the following
> information for it:
>
> * Test cases for stuff that worked previously and is broken in 1.09
I'm having a problem with 'gprof' when I try to profile execution
times with go32 version 1.09: it doesn't seem to record execution
times in the 'gmon.out' file. I _do_ get timing info when I run it
with 1.08.
A simple test program is at the end of this note. I compile it with:
gcc -pg -Wall -o test test.c
and run with:
go32 test
A 'gmon.out' is created, and I profile with:
gprof test > test.gpr
When I use go32(1.08) to run 'test', gprof produces:
...skipping...
> Each sample counts as 0.0555556 seconds.
>
> % time seconds cumsec calls function
> 99.70 18.72 18.72 1000 subr
> 0.30 0.06 18.78 close
> 0.00 0.00 18.78 5 fclose
> 0.00 0.00 18.78 5 fflush
...etc.
but with go32(1.09), it's:
...skipping...
> Each sample counts as 0.0555556 seconds.
>
> % time seconds cumsec calls function
> 0.00 0.00 0.00 1000 subr
> 0.00 0.00 0.00 5 fclose
> 0.00 0.00 0.00 5 fflush
...etc.
-----------------------------------
The sample program 'test.c':
----------------------------------------------------------------------
void
subr(void)
{
int i;
for (i=0; i<10000; i++)
;
}
int
main(void)
{
int i;
for (i=0; i<1000; i++)
;
for (i=0; i<1000; i++)
subr();
exit(0);
}
----------------------------------------------------------------------
Thanks,
Peter E. Miller
- Raw text -