From owner-svn-src-head@FreeBSD.ORG Wed Jun 30 01:40:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FD78106566B; Wed, 30 Jun 2010 01:40:26 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E0E18FC08; Wed, 30 Jun 2010 01:40:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5U1eQGj097568; Wed, 30 Jun 2010 01:40:26 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5U1eQVG097566; Wed, 30 Jun 2010 01:40:26 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201006300140.o5U1eQVG097566@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 30 Jun 2010 01:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209604 - head/lib/libc/gmon X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 01:40:26 -0000 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;