Skip to content

Commit

Permalink
tracing: Fix function timing profiler to initialize hashtable
Browse files Browse the repository at this point in the history
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: 5fccc75 ("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>
  • Loading branch information
mhiramat authored and rostedt committed Sep 30, 2024
1 parent 9852d85 commit c54a1a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit c54a1a0

Please sign in to comment.