From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Markos Chandras <Markos.Chandras@imgtec.com>
Subject: [for-next][PATCH 5/5] ftrace/x86: Have static function tracing always test for function graph
Date: Tue, 25 Nov 2014 07:14:00 -0500 [thread overview]
Message-ID: <20141125121426.926254854@goodmis.org> (raw)
In-Reply-To: <20141125121355.225538266@goodmis.org>
[-- Attachment #1: 0005-ftrace-x86-Have-static-function-tracing-always-test-.patch --]
[-- Type: text/plain, Size: 1295 bytes --]
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
New updates to the ftrace generic code had ftrace_stub not always being
called when ftrace is off. This causes the static tracer to always save
and restore functions. But it also showed that when function tracing is
running, the function graph tracer can not. We should always check to see
if function graph tracing is running even if the function tracer is running
too. The function tracer code is not the only one that uses the hook to
function mcount.
Cc: Markos Chandras <Markos.Chandras@imgtec.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
arch/x86/kernel/mcount_64.S | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S
index 35a793fa4bba..6dc134b8dc70 100644
--- a/arch/x86/kernel/mcount_64.S
+++ b/arch/x86/kernel/mcount_64.S
@@ -194,6 +194,7 @@ ENTRY(function_hook)
cmpq $ftrace_stub, ftrace_trace_function
jnz trace
+fgraph_trace:
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
cmpq $ftrace_stub, ftrace_graph_return
jnz ftrace_graph_caller
@@ -220,7 +221,7 @@ trace:
MCOUNT_RESTORE_FRAME
- jmp ftrace_stub
+ jmp fgraph_trace
END(function_hook)
#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* CONFIG_FUNCTION_TRACER */
--
2.1.1
prev parent reply other threads:[~2014-11-25 12:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 12:13 [for-next][PATCH 0/5] ftrace: More stuff for 3.19 Steven Rostedt
2014-11-25 12:13 ` [for-next][PATCH 1/5] tracing/trivial: Fix typos and make an int into a bool Steven Rostedt
2014-11-25 12:13 ` [for-next][PATCH 2/5] kprobes/ftrace: Recover original IP if pre_handler doesnt change it Steven Rostedt
2014-11-25 12:13 ` [for-next][PATCH 3/5] ftrace, kprobes: Support IPMODIFY flag to find IP modify conflict Steven Rostedt
2014-11-25 12:13 ` [for-next][PATCH 4/5] kprobes: Add IPMODIFY flag to kprobe_ftrace_ops Steven Rostedt
2014-11-25 12:14 ` Steven Rostedt [this message]
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=20141125121426.926254854@goodmis.org \
--to=rostedt@goodmis.org \
--cc=Markos.Chandras@imgtec.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.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
Powered by JetHome