Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754977AbYG1OmS (ORCPT ); Mon, 28 Jul 2008 10:42:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751935AbYG1OmG (ORCPT ); Mon, 28 Jul 2008 10:42:06 -0400 Received: from mx3.mail.elte.hu ([157.181.1.138]:57582 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbYG1OmF (ORCPT ); Mon, 28 Jul 2008 10:42:05 -0400 Date: Mon, 28 Jul 2008 16:41:33 +0200 From: Ingo Molnar To: Hugh Dickins Cc: Mike Travis , Ben Herrenschmidt , linux-kernel@vger.kernel.org, the arch/x86 maintainers , Linuxppc-dev@ozlabs.org, Arjan van de Ven , Linus Torvalds Subject: Re: CONFIG_FRAME_POINTER [was [PATCH] x86: BUILD_IRQ say .text] Message-ID: <20080728144133.GH18144@elte.hu> References: <20080724104459.GI28817@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2282 Lines: 55 * Hugh Dickins wrote: > [PATCH] sched: move sched_clock before first use > > Move sched_clock() up to stop warning: weak declaration of > `sched_clock' after first use results in unspecified behavior (if > -fno-unit-at-a-time). > > Signed-off-by: Hugh Dickins applied to tip/sched/urgent - thanks Hugh. > I rather think CONFIG_FRAME_POINTER shouldn't exist at all (or be a > private, config-user-invisible, specific-to-a-few-arches thing): what > one wants to configure is how far to sacrifice cpu performance and > kernel smallness to getting a good stacktrace. Frame pointer is just > an implementation detail on that, appropriate to some arches. Perhaps > three settings: no stacktrace, fair stacktrace, best stacktrace. actually, we consciously use and rely on frame pointers on x86. The runtime cost on 64-bit is miniscule and the improved backtrace output in recent kernels makes backtraces _much_ easier to interpret: Call Trace: [] _raw_spin_trylock+0x19/0x50 [] _spin_lock_irqsave+0x59/0x90 [] atomic_notifier_chain_register+0x24/0x60 [] ? __profile_tick+0x58/0x90 [] nmi_watchdog_tick+0x59/0x1e0 [] default_do_nmi+0x6a/0x220 [] do_nmi+0x64/0xb0 [] nmi+0xa2/0xc2 [] ? stopmachine+0x61/0xd0 <> [] child_rip+0xa/0x11 [] ? restore_args+0x0/0x30 [] ? stopmachine+0x0/0xd0 [] ? child_rip+0x0/0x11 we experimented with using dwarf2 data in the past but it proved to be very fragile in practice - we depended too much on the whims of gcc/binutils being absolutely correct, etc. Something as fundamental to the kernel's general health as backtraces must not be fragile. So the EBP based backtracing code was ported to 64-bit as well and it was improved further upon. kudos to Arjan for that. Ingo -- 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/