Skip to content

Commit 45ed61b

Browse files
rostedtgregkh
authored andcommitted
tracing: Fix graph tracer with stack tracer on other archs
commit 5f8bf2d upstream. Running my ftrace tests on PowerPC, it failed the test that checks if function_graph tracer is affected by the stack tracer. It was. Looking into this, I found that the update_function_graph_func() must be called even if the trampoline function is not changed. This is because archs like PowerPC do not support ftrace_ops being passed by assembly and instead uses a helper function (what the trampoline function points to). Since this function is not changed even when multiple ftrace_ops are added to the code, the test that falls out before calling update_function_graph_func() will miss that the update must still be done. Call update_function_graph_function() for all calls to update_ftrace_function() Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 86fb4c8 commit 45ed61b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/trace/ftrace.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,12 @@ static void update_ftrace_function(void)
331331
func = ftrace_ops_list_func;
332332
}
333333

334+
update_function_graph_func();
335+
334336
/* If there's no change, then do nothing more here */
335337
if (ftrace_trace_function == func)
336338
return;
337339

338-
update_function_graph_func();
339-
340340
/*
341341
* If we are using the list function, it doesn't care
342342
* about the function_trace_ops.

0 commit comments

Comments
 (0)