diff options
-rw-r--r-- | kernel/trace/trace.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index f2ef72fa3f17..6ada059832a6 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -2990,7 +2990,7 @@ struct dentry *tracing_init_dentry(void) | |||
2990 | #include "trace_selftest.c" | 2990 | #include "trace_selftest.c" |
2991 | #endif | 2991 | #endif |
2992 | 2992 | ||
2993 | static __init void tracer_init_debugfs(void) | 2993 | static __init int tracer_init_debugfs(void) |
2994 | { | 2994 | { |
2995 | struct dentry *d_tracer; | 2995 | struct dentry *d_tracer; |
2996 | struct dentry *entry; | 2996 | struct dentry *entry; |
@@ -3078,6 +3078,7 @@ static __init void tracer_init_debugfs(void) | |||
3078 | #ifdef CONFIG_SYSPROF_TRACER | 3078 | #ifdef CONFIG_SYSPROF_TRACER |
3079 | init_tracer_sysprof_debugfs(d_tracer); | 3079 | init_tracer_sysprof_debugfs(d_tracer); |
3080 | #endif | 3080 | #endif |
3081 | return 0; | ||
3081 | } | 3082 | } |
3082 | 3083 | ||
3083 | int trace_vprintk(unsigned long ip, const char *fmt, va_list args) | 3084 | int trace_vprintk(unsigned long ip, const char *fmt, va_list args) |
@@ -3504,17 +3505,20 @@ __init static int tracer_alloc_buffers(void) | |||
3504 | pages, trace_nr_entries, (long)TRACE_ENTRY_SIZE); | 3505 | pages, trace_nr_entries, (long)TRACE_ENTRY_SIZE); |
3505 | pr_info(" actual entries %ld\n", global_trace.entries); | 3506 | pr_info(" actual entries %ld\n", global_trace.entries); |
3506 | 3507 | ||
3507 | tracer_init_debugfs(); | ||
3508 | |||
3509 | trace_init_cmdlines(); | 3508 | trace_init_cmdlines(); |
3510 | 3509 | ||
3511 | register_tracer(&nop_trace); | 3510 | register_tracer(&nop_trace); |
3511 | #ifdef CONFIG_BOOT_TRACER | ||
3512 | register_tracer(&boot_tracer); | ||
3513 | current_trace = &boot_tracer; | ||
3514 | current_trace->init(&global_trace); | ||
3515 | #else | ||
3512 | current_trace = &nop_trace; | 3516 | current_trace = &nop_trace; |
3517 | #endif | ||
3513 | 3518 | ||
3514 | /* All seems OK, enable tracing */ | 3519 | /* All seems OK, enable tracing */ |
3515 | global_trace.ctrl = tracer_enabled; | 3520 | global_trace.ctrl = tracer_enabled; |
3516 | tracing_disabled = 0; | 3521 | tracing_disabled = 0; |
3517 | |||
3518 | atomic_notifier_chain_register(&panic_notifier_list, | 3522 | atomic_notifier_chain_register(&panic_notifier_list, |
3519 | &trace_panic_notifier); | 3523 | &trace_panic_notifier); |
3520 | 3524 | ||
@@ -3548,4 +3552,5 @@ __init static int tracer_alloc_buffers(void) | |||
3548 | } | 3552 | } |
3549 | return ret; | 3553 | return ret; |
3550 | } | 3554 | } |
3551 | fs_initcall(tracer_alloc_buffers); | 3555 | early_initcall(tracer_alloc_buffers); |
3556 | fs_initcall(tracer_init_debugfs); | ||