svn commit: r209604 - head/lib/libc/gmon

M. Warner Losh imp at bsdimp.com
Wed Jun 30 04:12:31 UTC 2010


In message: <F642907C-9545-4DD4-9519-DEE245B012F6 at mac.com>
            Marcel Moolenaar <xcllnt at mac.com> writes:
: 
: On Jun 29, 2010, at 8:05 PM, M. Warner Losh wrote:
: 
: > In message: <3E9AF18F-9404-49A8-A3A6-CB1F8CF06A80 at mac.com>
: >            Marcel Moolenaar <xcllnt at mac.com> writes:
: > : 
: > : On Jun 29, 2010, at 7:37 PM, M. Warner Losh wrote:
: > : 
: > : > In message: <14807AD0-2BC9-4FF1-9C2B-9E47FA2F9A41 at mac.com>
: > : >            Marcel Moolenaar <xcllnt at mac.com> writes:
: > : > : 
: > : > : On Jun 29, 2010, at 6:48 PM, Garrett Cooper wrote:
: > : > : >> 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;
: > : > : > 
: > : > : > Hi Marcel and Warner,
: > : > : >    Should this perhaps be properly expanded to other architectures,
: > : > : > like arm and mips? I'm not sure if we have a FP emulator on FreeBSD or
: > : > : > not like Cavium does on Linux.
: > : > : 
: > : > : Yes, this can be expanded. I opted for a conservative commit to
: > : > : see what the general response to this commit would be.
: > : > 
: > : > My response: "Why doesn't the soft floating point make this
: > : > unnecessary?" and "What about G4's and G5's that have floating point?"
: > : 
: > : See the commit log: it's most likely a problem with the expression
: > : or with the compiler in dealing with the expression.
: > 
: > That's a little vague.
: > 
: > But it does suggest that arm and mips won't have to worry.
: 
: No it doesn't. In fact, profiling on ARM shows the same problems
: that I just fixed on PowerPC. It's best that people validate MIPS
: before dismissing this as a non-issue.

Then I don't think this is just a simple compiler bug, but something
more fundamental.  the softfloat stuff should make this unnecessary.

Warner


More information about the freebsd-arm mailing list