Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Oct 1996 22:40:25 -0700 (PDT)
From:      "Steven G. Kargl" <sgk@troutmask.apl.washington.edu>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        freebsd-current@freebsd.org
Subject:   Re: Is profiling code broken?
Message-ID:  <199610240540.WAA17697@troutmask.apl.washington.edu>
In-Reply-To: <199610240223.MAA25268@godzilla.zeta.org.au> from Bruce Evans at "Oct 24, 96 12:23:25 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
According to Bruce Evans:
> >In my battle to increase the speed of some of my computations, I
> >will compile the code with profiling enabled.  Today, to my 
> >surprise my code seems to be executing infinitely fast.  
> >
> >This is on a -current machine that was last build on 9 Oct 96.
> >I'm in the process of doing a make world on freshly supped
> >sources.
> 
> It workes with my version of -current with old (6 Sep 06) profiling
> libraries.  I have changed kernel profiling a lot, but the changes
> are now in -current and I haven't changed user profiling much.
> 
> $ time ./t
>         37.95 real        37.89 user         0.03 sys
> 
> >kargl[264] f77 -o t -pg t.f
> >kargl[265] time t
> >       59.80 real         0.00 user        48.34 sys
> 
> This is unreasonable even without profiling.  Perhaps the statistics
> clock has stopped.  This used to be more obvious because it also caused
> zero system times too, but statistics counts of 0 for system time are now
> converted to 1 so that short-lived processes are accounted for somewhere.
> 

I recompiled my kernel with freshly supped sources and the problem
went away.  The old kernel with the problem was built from sources
dated 9 Oct 96.  What is strange about the situation is that I ran
some profiled code last week without a problem.  The only things I
can think of that might have caused the problem are moused and tkman
from the ports collections.  These are the only new items added to
my system since last week.  Anyway, everything appears fine, but
I'll investigate somemore tomorrow.

One other question:  during a make world the profiled libraries are
built with the -p compiler option.  Shouldn't this be -pg?  Each time
I try to link an executable compiled with -p, ld complains about
/usr/lib/mcrt0.o missing.

-- 
Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610240540.WAA17697>