]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tracing: Fix function timing profiler to initialize hashtable
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Sun, 18 Aug 2024 12:50:28 +0000 (21:50 +0900)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 30 Sep 2024 15:12:46 +0000 (11:12 -0400)
Since the new fgraph requires to initialize fgraph_ops.ops.func_hash before
calling register_ftrace_graph(), initialize it with default (tracing all
functions) parameter.

Cc: stable@vger.kernel.org
Fixes: 5fccc7552ccb ("ftrace: Add subops logic to allow one ops to manage many")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/ftrace.c

index 4c28dd177ca650686d92895b7614ada665d6cf86..d2dd71d04b8ac626631b1fdb175e56bca4cddc40 100644 (file)
@@ -883,6 +883,10 @@ static void profile_graph_return(struct ftrace_graph_ret *trace,
 }
 
 static struct fgraph_ops fprofiler_ops = {
+       .ops = {
+               .flags = FTRACE_OPS_FL_INITIALIZED,
+               INIT_OPS_HASH(fprofiler_ops.ops)
+       },
        .entryfunc = &profile_graph_entry,
        .retfunc = &profile_graph_return,
 };