From: tip-bot for Steven Rostedt <srostedt@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
andi@firstfloor.org, rostedt@goodmis.org, srostedt@redhat.com,
tglx@linutronix.de, hpa@linux.intel.com
Subject: [tip:perf/core] ftrace: Do not test frame pointers if -mfentry is used
Date: Mon, 27 Aug 2012 10:05:23 -0700 [thread overview]
Message-ID: <tip-781d06248234e221edb560a18461d65808a8a942@git.kernel.org> (raw)
In-Reply-To: <20120807194059.773895870@goodmis.org>
Commit-ID: 781d06248234e221edb560a18461d65808a8a942
Gitweb: http://git.kernel.org/tip/781d06248234e221edb560a18461d65808a8a942
Author: Steven Rostedt <srostedt@redhat.com>
AuthorDate: Wed, 9 Feb 2011 13:27:22 -0500
Committer: Steven Rostedt <rostedt@goodmis.org>
CommitDate: Thu, 23 Aug 2012 11:25:29 -0400
ftrace: Do not test frame pointers if -mfentry is used
The function graph has a test to check if the frame pointer is
corrupted, which can happen with various options of gcc with mcount.
But this is not an issue with -mfentry as -mfentry does not need nor use
frame pointers for function graph tracing.
Link: http://lkml.kernel.org/r/20120807194059.773895870@goodmis.org
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_functions_graph.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index ce27c8b..99b4378 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -143,7 +143,7 @@ ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret,
return;
}
-#ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST
+#if defined(CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST) && !defined(CC_USING_FENTRY)
/*
* The arch may choose to record the frame pointer used
* and check it here to make sure that it is what we expect it
@@ -154,6 +154,9 @@ ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret,
*
* Currently, x86_32 with optimize for size (-Os) makes the latest
* gcc do the above.
+ *
+ * Note, -mfentry does not use frame pointers, and this test
+ * is not needed if CC_USING_FENTRY is set.
*/
if (unlikely(current->ret_stack[index].fp != frame_pointer)) {
ftrace_graph_stop();
next prev parent reply other threads:[~2012-08-27 17:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 19:38 [RFC PATCH 0/4] ftrace: Add use of -mfentry for x86_64 Steven Rostedt
2012-08-07 19:38 ` [RFC PATCH 1/4] ftrace: Make recordmcount.c handle __fentry__ Steven Rostedt
2012-08-07 23:57 ` John Reiser
2012-08-08 0:05 ` Steven Rostedt
2012-08-27 17:03 ` [tip:perf/core] " tip-bot for Steven Rostedt
2012-08-07 19:38 ` [RFC PATCH 2/4] ftrace: Add -mfentry to Makefile on function tracer Steven Rostedt
2012-08-27 17:04 ` [tip:perf/core] " tip-bot for Steven Rostedt
2012-08-07 19:38 ` [RFC PATCH 3/4] ftrace: Do not test frame pointers if -mfentry is used Steven Rostedt
2012-08-08 4:34 ` Masami Hiramatsu
2012-08-08 12:49 ` Steven Rostedt
2012-08-09 2:58 ` Masami Hiramatsu
2012-08-09 3:45 ` Linus Torvalds
2012-08-09 3:57 ` Steven Rostedt
2012-08-09 4:15 ` H. Peter Anvin
2012-08-09 12:37 ` Andi Kleen
2012-08-27 17:05 ` tip-bot for Steven Rostedt [this message]
2012-08-07 19:38 ` [RFC PATCH 4/4] ftrace/x86: Add support for -mfentry to x86_64 Steven Rostedt
2012-08-09 8:34 ` Masami Hiramatsu
2012-08-09 13:46 ` Steven Rostedt
2012-08-09 13:48 ` Steven Rostedt
2012-08-10 7:45 ` Masami Hiramatsu
2012-08-27 17:06 ` [tip:perf/core] " tip-bot for Steven Rostedt
2012-08-07 20:23 ` [RFC PATCH 0/4] ftrace: Add use of -mfentry for x86_64 H. Peter Anvin
2012-08-13 8:42 ` Ingo Molnar
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=tip-781d06248234e221edb560a18461d65808a8a942@git.kernel.org \
--to=srostedt@redhat.com \
--cc=andi@firstfloor.org \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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).