From owner-freebsd-current Sun Jan 20 16:30:17 2002 Delivered-To: freebsd-current@freebsd.org Received: from web14001.mail.yahoo.com (web14001.mail.yahoo.com [216.136.175.92]) by hub.freebsd.org (Postfix) with SMTP id 5993737B402 for ; Sun, 20 Jan 2002 16:30:11 -0800 (PST) Message-ID: <20020121002635.39089.qmail@web14001.mail.yahoo.com> Received: from [198.95.226.231] by web14001.mail.yahoo.com via HTTP; Sun, 20 Jan 2002 16:26:35 PST Date: Sun, 20 Jan 2002 16:26:35 -0800 (PST) From: k Macy Subject: Re: profiled kernel build fails was Re: -CURRENT AIO bug To: Bruce Evans Cc: freebsd-current@FreeBSD.ORG In-Reply-To: <20020120164213.L7131-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Should I file a PR to track this or is that overkill? -Kip --- Bruce Evans wrote: > On Sat, 19 Jan 2002, k Macy wrote: > > > Thanks for working on this. I was going to try > running > > a profiled kernel on -CURRENT and -STABLE to see > what > > the difference was in time distribution. On > -STABLE > > it built without a hitch. However, on -CURRENT I > got > > the following even after doing a make clean: > > > > ../../../libkern/mcount.c: In function `mcount': > > ../../../libkern/mcount.c:91: `mcount_lock' > undeclared > > (first use in this function) > > The mcount_lock stuff apparently never even > compiled. It is only used > for the !GUPROF && SMP case, but it cannot work in > that case since > mcount_lock is not declared. Unfortunately, LINT > only tests the GUPROF > case, which compiles but is even more broken at > runtime in the SMP > case. GUPROF worse fine in the !SMP case and should > be non-optional > (it gives about 100000 times as much resolution as > PROF on current > machines, instead of only 1000 times as much as on > 486's when it was > written). > > This fix has not been tested. It has some chance of > working, because > RELENG_4 uses similar code. However, it is > certainly broken if the > atomic functions that it calls are not inlined (then > the functions will > call MCOUNT_ENTER() on entry). I think this only > happens if mcount.c > is compiled with -O0. This bug is missing in > RELENG_4 too. > > %%% > Index: profile.h > =================================================================== > RCS file: > /home/ncvs/src/sys/i386/include/profile.h,v > retrieving revision 1.25 > diff -u -2 -r1.25 profile.h > --- profile.h 30 Oct 2001 15:04:57 -0000 1.25 > +++ profile.h 20 Jan 2002 06:05:24 -0000 > @@ -65,4 +65,5 @@ > #define MCOUNT_DECL(s) u_long s; > #ifdef SMP > +extern int mcount_lock; > #define MCOUNT_ENTER(s) { s = read_eflags(); > disable_intr(); \ > while (!atomic_cmpset_acq_int(&mcount_lock, > 0, 1)) \ > %%% > > Bruce > __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message