linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What do frame pointers do?
@ 2003-11-02 17:00 Bradley Chapman
  2003-11-03  4:45 ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Bradley Chapman @ 2003-11-02 17:00 UTC (permalink / raw)
  To: linux-kernel

What exactly is the purpose of a frame pointer? As far back as I can remember, 2.4
and 2.6 kernels have supported something called a frame pointer, which slows down
the kernel slightly but supposedly outputs 'very useful debugging information.'
Unfortunately, it doesn't really explain what they are, and for the past few months,
I haven't seen any hacker gods asking for CONFIG_FRAME_POINTER=y, except for Russell
King, who wants them compiled for ARM processors for some reason (I grepped the
kernel source looking for answers and found a comment which implied this).

Does anyone know where I can find a good explanation of what they are and what they
do?

TIA

Brad Chapman

=====
Brad Chapman

Permanent e-mail: kakadu_croc@yahoo.com

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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

* Re: What do frame pointers do?
  2003-11-02 17:00 What do frame pointers do? Bradley Chapman
@ 2003-11-03  4:45 ` Randy.Dunlap
  2003-11-03  9:29   ` Bradley Chapman
  0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2003-11-03  4:45 UTC (permalink / raw)
  To: Bradley Chapman; +Cc: linux-kernel

On Sun, 2 Nov 2003 09:00:29 -0800 (PST) Bradley Chapman <kakadu_croc@yahoo.com> wrote:

| What exactly is the purpose of a frame pointer? As far back as I can remember, 2.4
| and 2.6 kernels have supported something called a frame pointer, which slows down
| the kernel slightly but supposedly outputs 'very useful debugging information.'
| Unfortunately, it doesn't really explain what they are, and for the past few months,
| I haven't seen any hacker gods asking for CONFIG_FRAME_POINTER=y, except for Russell
| King, who wants them compiled for ARM processors for some reason (I grepped the
| kernel source looking for answers and found a comment which implied this).
| 
| Does anyone know where I can find a good explanation of what they are and what they
| do?

Frame pointers enable more deterministic back tracing of the stack,
which can be helpful for tracking down bugs.  I build with
CONFIG_FRAME_POINTER enabled all of the time.

Note, however, that current 2.6.x Makefile does not allow frame pointers
to be used with gcc 2.96 since it has some known problems with code generation
when using frame pointers.

There is a little discussion of frame pointers in the Intel
IA-32 Intel® Architecture Software Developer;s Manual Volume 1:
Basic Architecture
and
IA-32 Intel® Architecture Software Developer's Manual Volume 2:
Instruction Set Reference,
which are downloadable as .pdf files from developer.intel.com.

--
~Randy

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

* Re: What do frame pointers do?
  2003-11-03  4:45 ` Randy.Dunlap
@ 2003-11-03  9:29   ` Bradley Chapman
  2003-11-03 10:04     ` Russell King
  0 siblings, 1 reply; 4+ messages in thread
From: Bradley Chapman @ 2003-11-03  9:29 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1812 bytes --]

Mr. Dunlap,

--- "Randy.Dunlap" <rddunlap@osdl.org> wrote:
> On Sun, 2 Nov 2003 09:00:29 -0800 (PST) Bradley Chapman <kakadu_croc@yahoo.com>
> wrote:
> 
> | What exactly is the purpose of a frame pointer? As far back as I can remember,
> 2.4
> | and 2.6 kernels have supported something called a frame pointer, which slows
> down
> | the kernel slightly but supposedly outputs 'very useful debugging information.'
> | Unfortunately, it doesn't really explain what they are, and for the past few
> months,
> | I haven't seen any hacker gods asking for CONFIG_FRAME_POINTER=y, except for
> Russell
> | King, who wants them compiled for ARM processors for some reason (I grepped the
> | kernel source looking for answers and found a comment which implied this).
> | 
> | Does anyone know where I can find a good explanation of what they are and what
> they
> | do?
> 
> Frame pointers enable more deterministic back tracing of the stack,
> which can be helpful for tracking down bugs.  I build with
> CONFIG_FRAME_POINTER enabled all of the time.
> 
> Note, however, that current 2.6.x Makefile does not allow frame pointers
> to be used with gcc 2.96 since it has some known problems with code generation
> when using frame pointers.
> 
> There is a little discussion of frame pointers in the Intel
> IA-32 Intel® Architecture Software Developer;s Manual Volume 1:
> Basic Architecture
> and
> IA-32 Intel® Architecture Software Developer's Manual Volume 2:
> Instruction Set Reference,
> which are downloadable as .pdf files from developer.intel.com.

OK, thanks for explaining it to me.

> 
> --
> ~Randy

Brad


=====
Brad Chapman

Permanent e-mail: kakadu_croc@yahoo.com

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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

* Re: What do frame pointers do?
  2003-11-03  9:29   ` Bradley Chapman
@ 2003-11-03 10:04     ` Russell King
  0 siblings, 0 replies; 4+ messages in thread
From: Russell King @ 2003-11-03 10:04 UTC (permalink / raw)
  To: Bradley Chapman; +Cc: Randy.Dunlap, linux-kernel

On Mon, Nov 03, 2003 at 01:29:09AM -0800, Bradley Chapman wrote:
> > Frame pointers enable more deterministic back tracing of the stack,
> > which can be helpful for tracking down bugs.  I build with
> > CONFIG_FRAME_POINTER enabled all of the time.

On ARM, simply scanning the kernel stack for addresses in the kernels
text segment or a module text tends to (or at least used to) return a
large quantity of noise.  This makes reading the backtrace nearly
impossible - not only does it contain real function pointers and
return addresses, but also pointers to literal pools and the like.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

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

end of thread, other threads:[~2003-11-03 10:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-02 17:00 What do frame pointers do? Bradley Chapman
2003-11-03  4:45 ` Randy.Dunlap
2003-11-03  9:29   ` Bradley Chapman
2003-11-03 10:04     ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).