linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <srostedt@redhat.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER
Date: Sat, 02 May 2009 22:04:09 -0400	[thread overview]
Message-ID: <1241316249.4243.22.camel@localhost.localdomain> (raw)
In-Reply-To: <68B2EF73-0FD2-41F9-966B-9A54965AFBA6@kernel.crashing.org>


On Sat, 2009-05-02 at 21:48 +0200, Segher Boessenkool wrote:
> > This patch introduces HAVE_NORMAL_FRAME_POINTER Kconfig symbol. When
> > defined, the top level Makefile won't add -fno-omit-frame-pointer
> > cflag (the flag is useless for PowerPC kernels, and also makes gcc
> > generate wrong code).
> 
> > +++ b/arch/powerpc/Kconfig
> 
> > +	select HAVE_NORMAL_FRAME_POINTER
> 
> > +config HAVE_NORMAL_FRAME_POINTER
> > +	bool
> > +	help
> > +	  Architectures should select this symbol if their ABI implies
> > +	  having a frame pointer.
> 
> I am totally confused what you call a frame pointer here.
> None of the relevant PowerPC ABIs have a frame pointer
> separate from the stack pointer; the compiler can create
> one, of course.  A better config symbol name and help text
> would help understand this patch :-)

Yeah, I agree. This needs a better description. I only know what's going
on because I was there for the start of the discussion.

But just to be sure, this is what I think is happening.

When we add "-pg" to gcc, it automatically causes frame pointers to be
used.

But with PPC, it always has frame pointers and there's no problem.

But with Linux, when you add CONFIG_FRAME_POINTER, it automatically
adds:  -fno-omit-frame-pointer. Thus the config will add
"-fomit-frame-pointer" when CONFIG_FRAME_POINTER is not set, or it will
add "-fno-omit-frame-pointer" when it is set.

The problem with PPC is that "-fno-omit-frame-pointer" is buggy and
causes gcc to produce bad code.

Perhaps a better name would be:

HAVE_FRAME_POINTER_AS_DEFAULT

??

Or am I totally wrong in my analysis?

-- Steve

  reply	other threads:[~2009-05-03  2:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-02  0:13 [PATCH v5 0/3] Tracers vs. CALLER_ADDR on PowerPC Anton Vorontsov
2009-05-02  0:14 ` [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER Anton Vorontsov
2009-05-02 19:48   ` Segher Boessenkool
2009-05-03  2:04     ` Steven Rostedt [this message]
2009-05-05  7:56       ` Segher Boessenkool
2009-05-05 13:33         ` Steven Rostedt
2009-05-05 13:51           ` Segher Boessenkool
2009-05-05 23:11             ` Steven Rostedt
2009-05-18  4:14               ` Benjamin Herrenschmidt
2009-05-18 19:55                 ` Segher Boessenkool
2009-05-02  0:14 ` [PATCH 2/3] powerpc: Remove -fno-omit-frame-pointer workarounds Anton Vorontsov
2009-05-02  0:14 ` [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER Anton Vorontsov
  -- strict thread matches above, loose matches on Subject: below --
2009-03-20 16:44 [PATCH v4 0/3] Tracers vs. CALLER_ADDR on PowerPC Anton Vorontsov
2009-03-20 16:44 ` [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER Anton Vorontsov
2009-03-21  3:49   ` Steven Rostedt
2009-03-28 10:48     ` Anton Vorontsov
2009-03-29 22:54       ` Benjamin Herrenschmidt
2009-03-30  4:36         ` Sam Ravnborg
2009-04-05 21:07   ` Sam Ravnborg
2009-04-13 15:51     ` Steven Rostedt
2009-05-02  0:14     ` Anton Vorontsov

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=1241316249.4243.22.camel@localhost.localdomain \
    --to=srostedt@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=sam@ravnborg.org \
    --cc=segher@kernel.crashing.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).