Re: [PATCH v3 13/27] function_graph: Add pid tracing back to function graph tracer

Steven Rostedt
2024-06-06T00:08:55Z

On Mon, 03 Jun 2024 15:07:17 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> +++ b/kernel/trace/ftrace.c
> @@ -100,7 +100,7 @@ struct ftrace_ops *function_trace_op __read_mostly = &ftrace_list_end;
> /* What to set function_trace_op to */
> static struct ftrace_ops *set_function_trace_op;
>
> -static bool ftrace_pids_enabled(struct ftrace_ops *ops)
> +bool ftrace_pids_enabled(struct ftrace_ops *ops)
> {
> struct trace_array *tr;
>
> @@ -402,10 +402,11 @@ static void ftrace_update_pid_func(void)
> if (op->flags & FTRACE_OPS_FL_PID) {
> op->func = ftrace_pids_enabled(op) ?
> ftrace_pid_func : op->saved_func;
> - ftrace_update_trampoline(op);

Bah, this patch accidentally removed the above function and broke pid
tracing. Hmm, not sure why this still passed the tests. Will investigate.

-- Steve

> }
> } while_for_each_ftrace_op(op);
>
> + fgraph_update_pid_func();
> +
> update_ftrace_function();
> }
>