From owner-cvs-src@FreeBSD.ORG Tue Jul 22 07:18:03 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 114CD37B401; Tue, 22 Jul 2003 07:18:03 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 445BB43F3F; Tue, 22 Jul 2003 07:18:01 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id AAA00911; Wed, 23 Jul 2003 00:17:26 +1000 Date: Wed, 23 Jul 2003 00:17:24 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Poul-Henning Kamp In-Reply-To: <10036.1058870835@critter.freebsd.dk> Message-ID: <20030722235600.X8165@gamplex.bde.org> References: <10036.1058870835@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Paul Richards cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/lnc if_lnc.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 14:18:03 -0000 On Tue, 22 Jul 2003, Poul-Henning Kamp wrote: > In message <20030722104524.GA80471@survey.codeburst.net>, Paul Richards writes: > >On Tue, Jul 22, 2003 at 02:22:00AM -0700, Poul-Henning Kamp wrote: > >> phk 2003/07/22 02:22:00 PDT > >> > >> FreeBSD src repository > >> > >> Modified files: > >> sys/dev/lnc if_lnc.c > >> Log: > >> Don't inline ridiculously very large functions. > >> > >> Compared to the contents of these functions, an extra function call > >> is nano-peanuts. > > > >Both of those functions were called from just one place, inside the > >interrupt handler. Is there any reason to not inline them? > > Yes, we need to get -Werror on the kernel again, and GCC whines about > ridiculously large functions. I think you mean "gcc emits the requested diagnostic about functions that it doesn't inline, whether they are large or small". Just turn off -Winline to not request this diagnostic. > Inline should not be used unless it has a measurable impact on > performance. Several places, including if_lnc.c, used __inline to get cleaner code at no cost in performance. Removing __inline adds a tiny cost. I build RELENG_3, RELENG_4, -current, and my version of old version of -current all with the -current gcc. I only turned off -Winline for my version of -current since -Werror isn't on in the others. The number of inlining failures for a kernel with similar features but unsimilar bloat is: RELENG_3: 19 (15 for writertc in clock.c) RELENG_4: 39 (18 for writertc in clock.c) -current: 3167 (the leaf inlines haven't changed that much, but the bloat around them has) -my-not-very-current: ? (see no evil) Bruce