linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Kumar Gala <kumar.gala@freescale.com>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	David Edelsohn <dje@watson.ibm.com>,
	linuxppc64-dev@ozlabs.org
Subject: Re: CONFIG_FRAME_POINTER on ppc/ppc64?
Date: Tue, 16 Aug 2005 15:23:50 +1000	[thread overview]
Message-ID: <17153.30822.529374.24144@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <200508160403.j7G43Hd29692@makai.watson.ibm.com>

David Edelsohn writes:

> Kumar> I'm assuming that's a guess.  The reason I ask that is my memory  
> Kumar> serves correctly r31 is used as the frame pointer if compiled that  
> Kumar> way.  Maybe some GCC expert can chime in.  I'll copy David Edelsohn  
> Kumar> and see if I get a response :)
> 
> 	I am missing some context here.  On both 32-bit PowerPC Linux
> (PowerPC SVR4) and 64-bit PowerPC Linux, GPR r31 is used as the frame
> pointer.  PowerPC does not have a dedicated frame pointer and the PowerPC
> ABI does not require an independent frame pointer in a function at all
> times, so it can be omitted by default.  If the frame pointer is not
> referenced for any unique needs, uses of the frame pointer are adjusted to
> reference the stack pointer.  GCC only retains the PowerPC frame pointer
> when dynamic stack allocation (alloca) is used within a function.
> -fomit-frame-pointer has no effect on PowerPC because it is enabled by
> default.

OK, my memory was at fault then.

The reason for having the kernel config option is that it is
impossible to get reliable stack traces on x86 without frame pointers.
On PPC, because the stack frames are always linked together, even if
you don't use a frame pointer, the frame pointer doesn't help in
getting stack traces.  Thus there is no point in having the kernel
config option.

Paul.

  reply	other threads:[~2005-08-16  5:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-15 18:25 CONFIG_FRAME_POINTER on ppc/ppc64? Kumar Gala
2005-08-15 23:08 ` Paul Mackerras
2005-08-16  3:41   ` Kumar Gala
2005-08-16  4:03     ` David Edelsohn
2005-08-16  5:23       ` Paul Mackerras [this message]
2005-08-16  9:44     ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17153.30822.529374.24144@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=dje@watson.ibm.com \
    --cc=kumar.gala@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=linuxppc64-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).