Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751116AbWABWq5 (ORCPT ); Mon, 2 Jan 2006 17:46:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751117AbWABWq4 (ORCPT ); Mon, 2 Jan 2006 17:46:56 -0500 Received: from smtp.osdl.org ([65.172.181.4]:9638 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1751116AbWABWqx (ORCPT ); Mon, 2 Jan 2006 17:46:53 -0500 Date: Mon, 2 Jan 2006 14:43:09 -0800 (PST) From: Linus Torvalds To: Jan Engelhardt cc: Ingo Molnar , Krzysztof Halasa , Adrian Bunk , Arjan van de Ven , Tim Schmielau , Dave Jones , Andrew Morton , lkml , mpm@selenic.com Subject: Re: [patch 00/2] improve .text size on gcc 4.0 and newer compilers In-Reply-To: Message-ID: References: <20051230074916.GC25637@elte.hu> <20051231143800.GJ3811@stusta.de> <20051231144534.GA5826@elte.hu> <20051231150831.GL3811@stusta.de> <20060102103721.GA8701@elte.hu> <1136198902.2936.20.camel@laptopd505.fenrus.org> <20060102134345.GD17398@stusta.de> <20060102140511.GA2968@elte.hu> <20060102201325.GA32464@elte.hu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1685 Lines: 43 On Mon, 2 Jan 2006, Jan Engelhardt wrote: > >* Linus Torvalds wrote: > > > >> > For example, I add "inline" for static functions which are only called > >> > from one place. > >> > >> That's actually not a good practice. Two reasons: > >> > >> - debuggability goes way down. Oops reports give a much nicer call-chain > >> and better locality for uninlined code. > > When I want to debug, I use > CFLAGS="-O0 -ggdb3 -fno-inline -fno-omit-frame-pointer" > for that particular file(s). That sure gets good results. Not sure about > who wins in the kernel case: always_inline or -fno-inline. This is totally not relevant. 99% of all bug-reports happen for non-developers. What developers can and can not do from a debuggability standpoint is almost totally uninteresting: quite often the developers won't even be able to recreate the bug, but have to go on the bug report that comes in from the outside. And yes, some users are willing to recompile the kernel, and try ten different versions, and in general are just worth their weight in gold. But many people have trouble even reporting the (short) oops details, much less follow up on it. So it's actually important that the default config is reasonably easy to debug from the oops report. Because it may be the only thing you ever get. So -O0 and -fno-inline simply isn't practical, because they are not an option for a normal kernel. Linus - 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/