aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-11-24 14:58:17 -0500
committerSteven Rostedt <rostedt@goodmis.org>2014-11-24 15:02:25 -0500
commit62a207d748dd9224140a634786b274fdb6ece0b9 (patch)
tree5c1301c7deae55ab6137d75a1838b4d8b7a7547d
parent1d70be34df59f34b4562b8c047fc3a5069ce17b4 (diff)
ftrace/x86: Have static function tracing always test for function graph
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>
-rw-r--r--arch/x86/kernel/mcount_64.S3
1 files changed, 2 insertions, 1 deletions
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)
194 cmpq $ftrace_stub, ftrace_trace_function 194 cmpq $ftrace_stub, ftrace_trace_function
195 jnz trace 195 jnz trace
196 196
197fgraph_trace:
197#ifdef CONFIG_FUNCTION_GRAPH_TRACER 198#ifdef CONFIG_FUNCTION_GRAPH_TRACER
198 cmpq $ftrace_stub, ftrace_graph_return 199 cmpq $ftrace_stub, ftrace_graph_return
199 jnz ftrace_graph_caller 200 jnz ftrace_graph_caller
@@ -220,7 +221,7 @@ trace:
220 221
221 MCOUNT_RESTORE_FRAME 222 MCOUNT_RESTORE_FRAME
222 223
223 jmp ftrace_stub 224 jmp fgraph_trace
224END(function_hook) 225END(function_hook)
225#endif /* CONFIG_DYNAMIC_FTRACE */ 226#endif /* CONFIG_DYNAMIC_FTRACE */
226#endif /* CONFIG_FUNCTION_TRACER */ 227#endif /* CONFIG_FUNCTION_TRACER */