From: "H. Peter Anvin" <hpa@zytor.com>
To: Andrew Haley <aph@redhat.com>
Cc: Jakub Jelinek <jakub@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H.J. Lu" <hjl.tools@gmail.com>,
rostedt@goodmis.org, Ingo Molnar <mingo@elte.hu>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
feng.tang@intel.com, Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
David Daney <ddaney@caviumnetworks.com>,
Richard Guenther <richard.guenther@gmail.com>,
gcc <gcc@gcc.gnu.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH][GIT PULL][v2.6.32] tracing/x86: Add check to detect GCC messing with mcount prologue
Date: Tue, 24 Nov 2009 08:38:42 -0800 [thread overview]
Message-ID: <4B0C0C12.7040907@zytor.com> (raw)
In-Reply-To: <4B0BFFD0.2080203@redhat.com>
On 11/24/2009 07:46 AM, Andrew Haley wrote:
>>
>> Yes, a lot. The difference is that -maccumulate-outgoing-args allocates
>> space for arguments of the callee with most arguments in the prologue, using
>> subtraction from sp, then to pass arguments uses movl XXX, 4(%esp) etc.
>> and the stack pointer doesn't usually change within the function (except for
>> alloca/VLAs).
>> With -mno-accumulate-outgoing-args args are pushed using push instructions
>> and stack pointer is constantly changing.
>
> Alright. So, it is possible in theory for gcc to generate code that
> only uses -maccumulate-outgoing-args when it needs to realign SP.
> And, therefore, we could have a nice option for the kernel: one with
> (mostly) good code density and never generates the bizarre code
> sequence in the prologue.
>
If we're changing gcc anyway, then let's add the option of intercepting
the function at the point where the machine state is well-defined by
ABI, which is before the function stack frame is set up.
-maccumulate-outgoing-args sounds like it would be painful on x86 (not
using its cheap push/pop instructions), but I guess since it's only when
tracing it's less of an issue.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2009-11-24 16:42 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200911172214.nAHMEBh2023787@imap1.linux-foundation.org>
2009-11-18 19:30 ` [patch for 2.6.32? 1/3] hrtimers: remove the "timer_stats_active" check when setting the start info Thomas Gleixner
2009-11-18 20:24 ` [tip:timers/urgent] hrtimer: Fix /proc/timer_list regression tip-bot for Feng Tang
2009-11-19 7:20 ` Ingo Molnar
2009-11-19 10:05 ` Thomas Gleixner
2009-11-19 14:30 ` BUG: function graph tracer function frame assumptions Thomas Gleixner
2009-11-19 15:37 ` BUG: GCC-4.4.x changes the function frame on some functions Thomas Gleixner
2009-11-19 15:44 ` Andrew Haley
2009-11-19 15:54 ` H. Peter Anvin
2009-11-19 15:57 ` Richard Guenther
2009-11-19 16:02 ` Steven Rostedt
2009-11-19 16:11 ` H. Peter Anvin
2009-11-19 16:19 ` Frederic Weisbecker
2009-11-19 16:06 ` Thomas Gleixner
2009-11-19 16:17 ` Andrew Haley
2009-11-19 16:43 ` Thomas Gleixner
2009-11-19 16:12 ` Steven Rostedt
2009-11-19 15:45 ` H. Peter Anvin
2009-11-19 15:49 ` Richard Guenther
2009-11-19 15:52 ` Richard Guenther
2009-11-19 17:37 ` Andi Kleen
2009-11-19 17:39 ` Linus Torvalds
2009-11-19 17:51 ` Thomas Gleixner
2009-11-19 17:59 ` Steven Rostedt
2009-11-19 18:03 ` Richard Guenther
2009-11-19 18:22 ` Andrew Haley
2009-11-19 18:41 ` Linus Torvalds
2009-11-19 18:43 ` Linus Torvalds
2009-11-19 18:54 ` Linus Torvalds
2009-11-19 19:01 ` Thomas Gleixner
2009-11-23 9:16 ` Jakub Jelinek
2009-11-23 9:51 ` Thomas Gleixner
2009-11-19 19:10 ` David Daney
2009-11-19 19:28 ` Steven Rostedt
2009-11-19 19:46 ` Frederic Weisbecker
2009-11-19 19:54 ` Kai Tietz
2009-11-19 20:05 ` Frederic Weisbecker
2009-11-19 20:05 ` Steven Rostedt
2009-11-19 20:17 ` Steven Rostedt
2009-11-19 20:28 ` Frederic Weisbecker
2009-11-19 20:25 ` Frederic Weisbecker
2009-11-19 20:36 ` Linus Torvalds
2009-11-19 20:44 ` Steven Rostedt
2009-11-19 19:50 ` H. Peter Anvin
2009-11-19 20:06 ` Linus Torvalds
2009-11-19 21:12 ` Jeff Law
2009-11-19 20:10 ` Steven Rostedt
2009-11-19 21:05 ` Jeff Law
2009-11-19 18:31 ` Thomas Gleixner
2009-11-19 18:38 ` Linus Torvalds
2009-11-19 18:47 ` Ingo Molnar
2009-11-19 19:06 ` Steven Rostedt
2009-11-19 19:50 ` Ingo Molnar
2009-11-20 9:57 ` [PATCH] gcc mcount-nofp was " Andi Kleen
2009-11-20 12:34 ` Steven Rostedt
2009-11-20 19:06 ` H. Peter Anvin
2009-11-19 20:36 ` Thomas Gleixner
2009-11-19 18:20 ` Andrew Haley
2009-11-19 18:33 ` Steven Rostedt
2009-11-19 18:36 ` Andrew Pinski
2009-11-19 18:36 ` Andrew Haley
2009-11-19 18:37 ` H. Peter Anvin
2009-11-19 18:39 ` Thomas Gleixner
2009-11-20 5:23 ` [PATCH][GIT PULL][v2.6.32] tracing/x86: Add check to detect GCC messing with mcount prologue Steven Rostedt
2009-11-20 5:32 ` Steven Rostedt
2009-11-20 17:00 ` Steven Rostedt
2009-11-20 17:13 ` H. Peter Anvin
2009-11-20 19:35 ` Andrew Haley
2009-11-20 19:46 ` Steven Rostedt
2009-11-20 19:49 ` H. Peter Anvin
2009-11-22 9:38 ` H.J. Lu
2009-11-22 17:20 ` Andrew Haley
2009-11-22 23:30 ` H.J. Lu
2009-11-24 14:43 ` Andrew Haley
2009-11-24 14:55 ` Thomas Gleixner
2009-11-24 15:06 ` Jakub Jelinek
2009-11-24 15:32 ` Andrew Haley
2009-11-24 15:36 ` Jakub Jelinek
2009-11-24 15:46 ` Andrew Haley
2009-11-24 16:38 ` H. Peter Anvin [this message]
2009-11-24 17:12 ` Andrew Haley
2009-11-24 17:30 ` Steven Rostedt
2009-11-25 20:05 ` H. Peter Anvin
2009-11-24 19:55 ` H. Peter Anvin
2009-11-25 15:29 ` Thomas Gleixner
2009-11-25 15:44 ` Ingo Molnar
2009-11-25 15:53 ` Thomas Gleixner
2009-11-25 16:25 ` Ingo Molnar
2009-11-25 16:44 ` Jakub Jelinek
2009-11-25 20:12 ` H. Peter Anvin
2009-11-25 21:00 ` Andrew Haley
2009-11-22 9:05 ` Ingo Molnar
2009-11-20 10:30 ` [tip:timers/urgent] hrtimer: Fix /proc/timer_list regression tip-bot for Feng Tang
2009-11-20 14:19 ` Heiko Carstens
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=4B0C0C12.7040907@zytor.com \
--to=hpa@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=aph@redhat.com \
--cc=ddaney@caviumnetworks.com \
--cc=feng.tang@intel.com \
--cc=fweisbec@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=heiko.carstens@de.ibm.com \
--cc=hjl.tools@gmail.com \
--cc=jakub@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=richard.guenther@gmail.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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