From: Andi Kleen <andi@firstfloor.org>
To: John Reiser <jreiser@bitwagon.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Jiri Kosina <jkosina@suse.cz>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: tracing: gcc for x86 calling mcount with -fomit-frame-pointer
Date: Thu, 17 Dec 2009 20:02:19 +0100 [thread overview]
Message-ID: <87vdg5s9tw.fsf@basil.nowhere.org> (raw)
In-Reply-To: <4B2A689D.2050202@bitwagon.com> (John Reiser's message of "Thu, 17 Dec 2009 09:21:33 -0800")
John Reiser <jreiser@bitwagon.com> writes:
> On x86 and x86_64, current "gcc -pg -fomit-frame-pointer" is not allowed.
> This experimental patch against:
> http://mirrors.kernel.org/fedora/releases/12/Fedora/source/SRPMS/gcc-4.4.2-7.fc12.src.rpm
> allows such a combination, via the command line options:
> gcc --profile-before-prolog -fomit-frame-pointer
> This turns on profiling (as if -pg), moves the "call mcount" to be the
> very first instruction of a profiled routine, and omits the frame pointer
> (unless some condition other than profiling requires a frame pointer.)
> Placing the "call mcount" first, before any other code, has some advantages.
> For instance, a postprocessor easily can modify a CALL whose destination
> is known, to skip past the "call mcount" at the entry point.
>
> The current glibc implementation of mcount relies on a frame pointer.
> At least one recent change to Linux kernel traceback for tracing also relies
> on a frame pointer. So still there are conflicts, but they are different.
I submitted a similar patch for all of this some time to gcc,
and also resubmitted it recently. It doesn't seem to be very high
up the priority list of the gcc people.
It missed their "merge window" (although lots of other changes went in),
but they told me it's queued in some way for the next stage 1.
We'll see if that's true or not.
I also have a glibc patch for this.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2009-12-17 19:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 17:21 tracing: gcc for x86 calling mcount with -fomit-frame-pointer John Reiser
2009-12-17 19:02 ` Andi Kleen [this message]
2009-12-18 15:52 ` John Reiser
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=87vdg5s9tw.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=jkosina@suse.cz \
--cc=jreiser@bitwagon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.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