public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] allow CONFIG_FRAME_POINTER for x86-64
@ 2005-09-08 16:04 Jan Beulich
  2005-09-09  8:54 ` [discuss] " Andi Kleen
  0 siblings, 1 reply; 20+ messages in thread
From: Jan Beulich @ 2005-09-08 16:04 UTC (permalink / raw)
  To: Andreas Kleen; +Cc: linux-kernel, discuss

[-- Attachment #1: Type: text/plain, Size: 831 bytes --]

(Note: Patch also attached because the inline version is certain to get
line wrapped.)

Allow building the x86-64 kernels with frame pointers if so needed.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

diff -Npru 2.6.13/lib/Kconfig.debug
2.6.13-x86_64-frame-pointer/lib/Kconfig.debug
--- 2.6.13/lib/Kconfig.debug	2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-x86_64-frame-pointer/lib/Kconfig.debug	2005-09-02
09:57:40.000000000 +0200
@@ -151,7 +151,7 @@ config DEBUG_FS
 
 config FRAME_POINTER
 	bool "Compile the kernel with frame pointers"
-	depends on DEBUG_KERNEL && ((X86 && !X86_64) || CRIS || M68K ||
M68KNOMMU || FRV || UML)
+	depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU ||
FRV || UML)
 	default y if DEBUG_INFO && UML
 	help
 	  If you say Y here the resulting kernel image will be slightly
larger


[-- Attachment #2: linux-2.6.13-x86_64-frame-pointer.patch --]
[-- Type: application/octet-stream, Size: 830 bytes --]

(Note: Patch also attached because the inline version is certain to get
line wrapped.)

Allow building the x86-64 kernels with frame pointers if so needed.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

diff -Npru 2.6.13/lib/Kconfig.debug 2.6.13-x86_64-frame-pointer/lib/Kconfig.debug
--- 2.6.13/lib/Kconfig.debug	2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-x86_64-frame-pointer/lib/Kconfig.debug	2005-09-02 09:57:40.000000000 +0200
@@ -151,7 +151,7 @@ config DEBUG_FS
 
 config FRAME_POINTER
 	bool "Compile the kernel with frame pointers"
-	depends on DEBUG_KERNEL && ((X86 && !X86_64) || CRIS || M68K || M68KNOMMU || FRV || UML)
+	depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML)
 	default y if DEBUG_INFO && UML
 	help
 	  If you say Y here the resulting kernel image will be slightly larger

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: [discuss] [PATCH] allow CONFIG_FRAME_POINTER for x86-64
@ 2005-09-09 17:50 Chuck Ebbert
  2005-09-10  0:16 ` Andi Kleen
  0 siblings, 1 reply; 20+ messages in thread
From: Chuck Ebbert @ 2005-09-09 17:50 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: Andi Kleen, Jan Beulich, linux-kernel, discuss

In-Reply-To: <Pine.LNX.4.61.0509091208350.6247@goblin.wat.veritas.com>

On Fri, 9 Sep 2005 at 12:14:38 +0100 (BST), Hugh Dickins wrote:

> On Fri, 9 Sep 2005, Andi Kleen wrote:
> > 
> > It won't give more accurate backtraces, not even on i386 because show_stack
> > doesn't have any code to follow frame pointers.
> 
> Ah, right.

What's this for, then? (arch/i386/kernel/traps.c line 116)


static inline unsigned long print_context_stack(struct thread_info *tinfo,
                                unsigned long *stack, unsigned long ebp)
{
        unsigned long addr;

#ifdef  CONFIG_FRAME_POINTER
        while (valid_stack_ptr(tinfo, (void *)ebp)) {
                addr = *(unsigned long *)(ebp + 4);
                printk(" [<%08lx>] ", addr);
                print_symbol("%s", addr);
                printk("\n");
                ebp = *(unsigned long *)ebp;
        }
#else


I get nice clean stack traces on i386 with frame pointers enabled and
the kernel is smaller as well.

__
Chuck
Subliminal URL: www.sluggy.com/daily.php?date=050905

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2005-09-10  6:13 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-08 16:04 [PATCH] allow CONFIG_FRAME_POINTER for x86-64 Jan Beulich
2005-09-09  8:54 ` [discuss] " Andi Kleen
2005-09-09  9:16   ` Jan Beulich
2005-09-09  9:23     ` Andi Kleen
2005-09-09  9:40       ` Jan Beulich
2005-09-09 10:45         ` Hugh Dickins
2005-09-09 10:58           ` Andi Kleen
2005-09-09 11:14             ` Hugh Dickins
2005-09-09 11:21               ` Andi Kleen
2005-09-09 11:31                 ` Hugh Dickins
2005-09-09 11:42                   ` Andi Kleen
2005-09-09 12:00                     ` Hugh Dickins
2005-09-09 17:19             ` Alexander Nyberg
2005-09-10  5:13               ` Andrew Morton
2005-09-10  6:12                 ` Andi Kleen
2005-09-09 11:07       ` Philippe Elie
2005-09-09 11:19         ` Andi Kleen
2005-09-09 12:41         ` Eric Dumazet
  -- strict thread matches above, loose matches on Subject: below --
2005-09-09 17:50 Chuck Ebbert
2005-09-10  0:16 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox