mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-24 11:02:51 +00:00
function_graph: Move set_graph_function tests to shadow stack global var
The use of the task->trace_recursion for the logic used for the set_graph_function was a bit of an abuse of that variable. Now that there exists global vars that are per stack for registered graph traces, use that instead. Link: https://lore.kernel.org/linux-trace-kernel/171509105520.162236.10339831553995971290.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190823.472955399@goodmis.org Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Guo Ren <guoren@kernel.org> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
4497412a1f
commit
12117f3307
@@ -160,7 +160,7 @@ int trace_graph_entry(struct ftrace_graph_ent *trace,
|
||||
if (!ftrace_trace_task(tr))
|
||||
return 0;
|
||||
|
||||
if (ftrace_graph_ignore_func(trace))
|
||||
if (ftrace_graph_ignore_func(gops, trace))
|
||||
return 0;
|
||||
|
||||
if (ftrace_graph_ignore_irqs())
|
||||
@@ -247,7 +247,7 @@ void trace_graph_return(struct ftrace_graph_ret *trace,
|
||||
long disabled;
|
||||
int cpu;
|
||||
|
||||
ftrace_graph_addr_finish(trace);
|
||||
ftrace_graph_addr_finish(gops, trace);
|
||||
|
||||
if (trace_recursion_test(TRACE_GRAPH_NOTRACE_BIT)) {
|
||||
trace_recursion_clear(TRACE_GRAPH_NOTRACE_BIT);
|
||||
@@ -269,7 +269,7 @@ void trace_graph_return(struct ftrace_graph_ret *trace,
|
||||
static void trace_graph_thresh_return(struct ftrace_graph_ret *trace,
|
||||
struct fgraph_ops *gops)
|
||||
{
|
||||
ftrace_graph_addr_finish(trace);
|
||||
ftrace_graph_addr_finish(gops, trace);
|
||||
|
||||
if (trace_recursion_test(TRACE_GRAPH_NOTRACE_BIT)) {
|
||||
trace_recursion_clear(TRACE_GRAPH_NOTRACE_BIT);
|
||||
|
||||
Reference in New Issue
Block a user