Impact: enhance boot trace output with scheduling events Use the sched_switch tracer from the boot tracer. We also can trace schedule events inside the initcalls. Sched tracing is disabled after the initcall has finished and then reenabled before the next one is started.
Showing the changes to kernel/trace/trace_boot.c (1 of 4 files). Show all
Unified · Split
| @@ -27,10 +27,14 @@ void start_boot_trace(void) · 26 unmodified lines | |||
| 27 | 27 | ||
| 28 | void enable_boot_trace(void) | 28 | void enable_boot_trace(void) |
| 29 | { | 29 | { |
| 30 | if (pre_initcalls_finished) | ||
| 31 | tracing_start_cmdline_record(); | ||
| 30 | } | 32 | } |
| 31 | 33 | ||
| 32 | void disable_boot_trace(void) | 34 | void disable_boot_trace(void) |
| 33 | { | 35 | { |
| 36 | if (pre_initcalls_finished) | ||
| 37 | tracing_stop_cmdline_record(); | ||
| 34 | } | 38 | } |
| 35 | 39 | ||
| 36 | void reset_boot_trace(struct trace_array *tr) | 40 | void reset_boot_trace(struct trace_array *tr) |
| @@ -45,6 +49,8 @@ static void boot_trace_init(struct trace_array *tr) · 8 unmodified lines | |||
| 45 | 49 | ||
| 46 | for_each_cpu_mask(cpu, cpu_possible_map) | 50 | for_each_cpu_mask(cpu, cpu_possible_map) |
| 47 | tracing_reset(tr, cpu); | 51 | tracing_reset(tr, cpu); |
| 52 | |||
| 53 | sched_switch_trace.init(tr); | ||
| 48 | } | 54 | } |
| 49 | 55 | ||
| 50 | static void boot_trace_ctrl_update(struct trace_array *tr) | 56 | static void boot_trace_ctrl_update(struct trace_array *tr) |