summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorFrédéric Weisbecker <fweisbec@gmail.com>2008-09-23 11:38:18 +0100
committerIngo Molnar <mingo@elte.hu>2008-10-14 10:38:50 +0200
commit3bf77af6e1fef1124bf71d81f9f84885f0ee0dea (patch)
treee16ac5f19fdcef2634a4ee5d5c10e9f31ee6df78 /init
parent1f5c2abbdeb2bb07b20c6a66bfecefe6c867b1ee (diff)
downloadlinux-3bf77af6e1fef1124bf71d81f9f84885f0ee0dea.tar.gz
linux-3bf77af6e1fef1124bf71d81f9f84885f0ee0dea.tar.bz2
linux-3bf77af6e1fef1124bf71d81f9f84885f0ee0dea.zip
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: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'init')
-rw-r--r--init/main.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/init/main.c b/init/main.c
index 16abba05c826..1e39a1eab190 100644
--- a/init/main.c
+++ b/init/main.c
@@ -709,10 +709,12 @@ int do_one_initcall(initcall_t fn)
ktime_t t0, t1, delta;
char msgbuf[64];
int result;
+ struct boot_trace it;
if (initcall_debug) {
- printk("calling %pF", fn);
- printk(" @ %i\n", task_pid_nr(current));
+ it.caller = task_pid_nr(current);
+ it.func = fn;
+ printk("calling %pF @ %i\n", fn, it.caller);
t0 = ktime_get();
}
@@ -721,10 +723,11 @@ int do_one_initcall(initcall_t fn)
if (initcall_debug) {
t1 = ktime_get();
delta = ktime_sub(t1, t0);
-
- printk("initcall %pF returned %d after %Ld msecs\n",
- fn, result,
- (unsigned long long) delta.tv64 >> 20);
+ it.result = result;
+ it.duration = (unsigned long long) delta.tv64 >> 20;
+ printk("initcall %pF returned %d after %Ld msecs\n", fn,
+ result, it.duration);
+ trace_boot(&it);
}
msgbuf[0] = 0;
@@ -859,6 +862,7 @@ static int __init kernel_init(void * unused)
smp_prepare_cpus(setup_max_cpus);
do_pre_smp_initcalls();
+ start_boot_trace();
smp_init();
sched_init_smp();