diff options
author | marcel <marcel@FreeBSD.org> | 2010-06-30 01:40:25 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2010-06-30 01:40:25 +0000 |
commit | f2891c465ef29098b2cd144a91ea21ddb7a58b96 (patch) | |
tree | 839eb592656bd45d3a99c8ce53dfc78ee6d54ad3 /lib/libc/gmon | |
parent | b5829f3d30eb3ce939b5c700865c3f1c99cc396e (diff) | |
download | FreeBSD-src-f2891c465ef29098b2cd144a91ea21ddb7a58b96.zip FreeBSD-src-f2891c465ef29098b2cd144a91ea21ddb7a58b96.tar.gz |
On powerpc, calculate s_scale using the non-FP version previously
specific to hp300. Since FreeBSD does not support hp300, hp300 has
been removed from the condition altogether.
The FP version broke profiling on powerpc due to invalid results.
Casting to double instead of float resolved the issue, but with
Book-E not having a FP unit, the non-FP version looked preferrable.
Note that even on AIM hardware the FP version yielded an invalid
value for s_scale, so the problem is most likely with the compiler
or with the expression itself.
Diffstat (limited to 'lib/libc/gmon')
-rw-r--r-- | lib/libc/gmon/gmon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gmon/gmon.c b/lib/libc/gmon/gmon.c index fe769e8..9b1406a 100644 --- a/lib/libc/gmon/gmon.c +++ b/lib/libc/gmon/gmon.c @@ -111,7 +111,7 @@ monstartup(lowpc, highpc) o = p->highpc - p->lowpc; if (p->kcountsize < o) { -#ifndef hp300 +#if !defined(__powerpc__) s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1; #else /* avoid floating point */ int quot = o / p->kcountsize; |