diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 1090b2404110..8b87f1f74e32 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -9317,6 +9317,8 @@ void __init early_trace_init(void) static_key_enable(&tracepoint_printk_key.key); } tracer_alloc_buffers(); + + init_events(); } void __init trace_init(void) diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 1d514a1a3155..f2ff39353e03 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -1590,6 +1590,7 @@ extern void trace_event_enable_cmd_record(bool enable); extern void trace_event_enable_tgid_record(bool enable); extern int event_trace_init(void); +extern int init_events(void); extern int event_trace_add_tracer(struct dentry *parent, struct trace_array *tr); extern int event_trace_del_tracer(struct trace_array *tr); diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index a0a45901dc02..b194dd1c8420 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -1366,7 +1366,7 @@ static struct trace_event *events[] __initdata = { NULL }; -__init static int init_events(void) +__init int init_events(void) { struct trace_event *event; int i, ret; @@ -1384,4 +1384,3 @@ __init static int init_events(void) return 0; } -early_initcall(init_events);