Subject: Re: can't profile on Shark
To: None <port-arm@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-arm
Date: 08/03/2003 01:21:44
On Thu, Jun 26, 2003 at 15:59:14 +0100, Richard Earnshaw wrote:
> rearnsha@arm.com said:
> > I don't know why the gmon module needs to do FP arithmetic, I though
> > it just wrote out the raw tables.
>
> Hmm, this is from libc/gmon/gmon.c:
>
> #ifndef notdef
> s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
> #else /* avoid floating point */
> u_long quot = o / p->kcountsize;
>
> if (quot >= 0x10000)
> s_scale = 1;
> else if (quot >= 0x100)
> s_scale = 0x10000 / quot;
> else if (o >= 0x800000)
> s_scale = 0x1000000 / (o / (p->kcountsize >> 8));
> else
> s_scale = 0x1000000 / ((o << 8) / p->kcountsize);
> #endif
>
> Anyone know why that is "#ifndef notdef" rather than "#ifdef notdef"?
> Seems backwards to me...
On Thu, Jun 26, 2003 at 18:53:08 -0700, Jason Thorpe wrote:
> On Thursday, June 26, 2003, at 07:59 AM, Richard Earnshaw wrote:
>
> >Anyone know why that is "#ifndef notdef" rather than "#ifdef notdef"?
> >Seems backwards to me...
>
> Eek, yes, it's certainly a mistake.
SH3 seems to suffer from the same lossage:
_fixunssfsi.o(.text+0x4c): undefined reference to `__gesf2'
And that ifndef in gmon.c is still not fixed. Changing
s/ifndef/ifdef/ makes the program link and produce the gmon.out.
I'd like to commit that change.
SY, Uwe
--
uwe@ptc.spbu.ru | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen