From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 28 Jul 2008 16:41:33 +0200 From: Ingo Molnar To: Hugh Dickins 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 In-Reply-To: Cc: the arch/x86 maintainers , linux-kernel@vger.kernel.org, Mike Travis , Linuxppc-dev@ozlabs.org, Linus Torvalds , Arjan van de Ven List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , * 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