Commit 781d0624 authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt

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: default avatarH. Peter Anvin <>
Acked-by: default avatarIngo Molnar <>
Cc: Andi Kleen <>
Signed-off-by: default avatarSteven Rostedt <>
parent a2546fae
......@@ -143,7 +143,7 @@ ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret,
* 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)) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment