Skip to content

Commit c54a1a0

Browse files
mhiramatrostedt
authored andcommitted
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: [email protected] Fixes: 5fccc75 ("ftrace: Add subops logic to allow one ops to manage many") Signed-off-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 9852d85 commit c54a1a0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/trace/ftrace.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,10 @@ static void profile_graph_return(struct ftrace_graph_ret *trace,
883883
}
884884

885885
static struct fgraph_ops fprofiler_ops = {
886+
.ops = {
887+
.flags = FTRACE_OPS_FL_INITIALIZED,
888+
INIT_OPS_HASH(fprofiler_ops.ops)
889+
},
886890
.entryfunc = &profile_graph_entry,
887891
.retfunc = &profile_graph_return,
888892
};

0 commit comments

Comments
 (0)