Commit 6f4156723c084bfc0c0f72205c541fafb8ad3ded
Committed by
Steven Rostedt
1 parent
bcd83ea6cb
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
tracing: Allow tracers to start at core initcall
There's times during debugging that it is helpful to see traces of early boot functions. But the tracers are initialized at device_initcall() which is quite late during the boot process. Setting the kernel command line parameter ftrace=function will not show anything until the function tracer is initialized. This prevents being able to trace functions before device_initcall(). There's no reason that the tracers need to be initialized so late in the boot process. Move them up to core_initcall() as they still need to come after early_initcall() which initializes the tracing buffers. Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Showing 6 changed files with 7 additions and 8 deletions Side-by-side Diff
kernel/trace/ftrace.c
... | ... | @@ -2868,7 +2868,7 @@ |
2868 | 2868 | { |
2869 | 2869 | return register_ftrace_command(&ftrace_mod_cmd); |
2870 | 2870 | } |
2871 | -device_initcall(ftrace_mod_cmd_init); | |
2871 | +core_initcall(ftrace_mod_cmd_init); | |
2872 | 2872 | |
2873 | 2873 | static void function_trace_probe_call(unsigned long ip, unsigned long parent_ip, |
2874 | 2874 | struct ftrace_ops *op, struct pt_regs *pt_regs) |
... | ... | @@ -4055,7 +4055,7 @@ |
4055 | 4055 | ftrace_enabled = 1; |
4056 | 4056 | return 0; |
4057 | 4057 | } |
4058 | -device_initcall(ftrace_nodyn_init); | |
4058 | +core_initcall(ftrace_nodyn_init); | |
4059 | 4059 | |
4060 | 4060 | static inline int ftrace_init_dyn_debugfs(struct dentry *d_tracer) { return 0; } |
4061 | 4061 | static inline void ftrace_startup_enable(int command) { } |
kernel/trace/trace_branch.c
kernel/trace/trace_functions.c
kernel/trace/trace_functions_graph.c
kernel/trace/trace_irqsoff.c
kernel/trace/trace_sched_wakeup.c