Date: Wed, 30 Jun 2010 01:40:25 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r209604 - head/lib/libc/gmon Message-ID: <201006300140.o5U1eQVG097566@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Wed Jun 30 01:40:25 2010 New Revision: 209604 URL: http://svn.freebsd.org/changeset/base/209604 Log: 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. Modified: head/lib/libc/gmon/gmon.c Modified: head/lib/libc/gmon/gmon.c ============================================================================== --- head/lib/libc/gmon/gmon.c Wed Jun 30 01:10:08 2010 (r209603) +++ head/lib/libc/gmon/gmon.c Wed Jun 30 01:40:25 2010 (r209604) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006300140.o5U1eQVG097566>