tracing: Fix function timing profiler to initialize hashtable

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: 5fccc7552c ("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>
This commit is contained in:
Masami Hiramatsu (Google) 2024-08-18 21:50:28 +09:00 committed by Steven Rostedt (Google)
parent 9852d85ec9
commit c54a1a06da

View 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,
};