Commit 3bf77af6 authored by Frédéric Weisbecker's avatar Frédéric Weisbecker Committed by Ingo Molnar

tracing/ftrace: launch boot tracing after pre-smp initcalls

Launch the boot tracing inside the initcall_debug area. Old printk
have not been removed to keep the old way of initcall tracing for
backward compatibility.

[ mingo@elte.hu: resolved conflicts ]
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 1f5c2abb
...@@ -709,10 +709,12 @@ int do_one_initcall(initcall_t fn) ...@@ -709,10 +709,12 @@ int do_one_initcall(initcall_t fn)
ktime_t t0, t1, delta; ktime_t t0, t1, delta;
char msgbuf[64]; char msgbuf[64];
int result; int result;
struct boot_trace it;
if (initcall_debug) { if (initcall_debug) {
printk("calling %pF", fn); it.caller = task_pid_nr(current);
printk(" @ %i\n", task_pid_nr(current)); it.func = fn;
printk("calling %pF @ %i\n", fn, it.caller);
t0 = ktime_get(); t0 = ktime_get();
} }
...@@ -721,10 +723,11 @@ int do_one_initcall(initcall_t fn) ...@@ -721,10 +723,11 @@ int do_one_initcall(initcall_t fn)
if (initcall_debug) { if (initcall_debug) {
t1 = ktime_get(); t1 = ktime_get();
delta = ktime_sub(t1, t0); delta = ktime_sub(t1, t0);
it.result = result;
printk("initcall %pF returned %d after %Ld msecs\n", it.duration = (unsigned long long) delta.tv64 >> 20;
fn, result, printk("initcall %pF returned %d after %Ld msecs\n", fn,
(unsigned long long) delta.tv64 >> 20); result, it.duration);
trace_boot(&it);
} }
msgbuf[0] = 0; msgbuf[0] = 0;
...@@ -859,6 +862,7 @@ static int __init kernel_init(void * unused) ...@@ -859,6 +862,7 @@ static int __init kernel_init(void * unused)
smp_prepare_cpus(setup_max_cpus); smp_prepare_cpus(setup_max_cpus);
do_pre_smp_initcalls(); do_pre_smp_initcalls();
start_boot_trace();
smp_init(); smp_init();
sched_init_smp(); sched_init_smp();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment