Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758071AbZAIVds (ORCPT ); Fri, 9 Jan 2009 16:33:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758074AbZAIVdL (ORCPT ); Fri, 9 Jan 2009 16:33:11 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.124]:55797 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757272AbZAIVdI (ORCPT ); Fri, 9 Jan 2009 16:33:08 -0500 Date: Fri, 9 Jan 2009 16:33:04 -0500 (EST) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Theodore Tso cc: Richard Guenther , Linus Torvalds , Matthew Wilcox , Andi Kleen , Dirk Hohndel , "H. Peter Anvin" , Ingo Molnar , jim owens , Chris Mason , Peter Zijlstra , paulmck@linux.vnet.ibm.com, Gregory Haskins , Andrew Morton , Linux Kernel Mailing List , linux-fsdevel , linux-btrfs , Thomas Gleixner , Nick Piggin , Peter Morreale , Sven Dietrich , jh@suse.cz Subject: Re: [patch] measurements, numbers about CONFIG_OPTIMIZE_INLINING=y impact In-Reply-To: <20090109212335.GH23869@mit.edu> Message-ID: References: <20090109172011.GD26290@one.firstfloor.org> <20090109172801.GC6936@parisc-linux.org> <20090109174719.GG26290@one.firstfloor.org> <20090109173914.GD6936@parisc-linux.org> <84fc9c000901091109t2c2aef2fu596f8807b0962688@mail.gmail.com> <84fc9c000901091214i16fc74b7q349433a5586d5619@mail.gmail.com> <84fc9c000901091237i68b2e495tab55e61fb3dbd565@mail.gmail.com> <20090109212335.GH23869@mit.edu> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1448 Lines: 29 On Fri, 9 Jan 2009, Theodore Tso wrote: > I'm beginning to think that for the kernel, we should just simply > remove CONFIG_OPTIMIZE_INLINING (so that inline means > "always_inline"), and -fno-inline-functions > -fno-inline-functions-called-one (so that gcc never inlines functions > behind our back) --- and then we create tools that count how many times functions get used, and how big functions are, so that we can flag if some > function really should be marked inline when it isn't or vice versa. > > But given that this is a very hard thing for an automated program > todo, let's write some tools so we can easily put a human in the loop, > who can add or remove inline keywords where it makes sense, and let's > give up on gcc being able to "guess" correctly. > > For some things, like register allocation, I can accept that the > compiler will usually get these things right. But whether or not to > inline a function seems to be one of those things that humans (perhaps > with some tools assist) can still do a better job than compilers. Adding a function histogram in ftrace should be trivial. I can write one up if you want. It will only count the functions not inlined. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/