aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorTim Bird <tim.bird@am.sony.com>2008-10-09 18:23:05 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 04:39:27 -0400
commitca538f6bbe583406f941f3041d40c41f9a13d1de (patch)
tree460e3cf96472e327b48befbb4836c2d40e46f937 /init/main.c
parentad0a3b68114e8f3c25ac0045b45a2838f23e3b3a (diff)
tracing/fastboot: add better resolution to initcall debug/tracing
Change the time resolution for initcall_debug to microseconds, from milliseconds. This is handy to determine which initcalls you want to work on for faster booting. One one of my test machines, over 90% of the initcalls are less than a millisecond and (without this patch) these are all reported as 0 msecs. Working on the 900 us ones is more important than the 4 us ones. With 'quiet' on the kernel command line, this adds no significant overhead to kernel boot time. Signed-off-by: Tim Bird <tim.bird@am.sony.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c
index e7939de80f3e..b2e7ff4a5349 100644
--- a/init/main.c
+++ b/init/main.c
@@ -721,8 +721,8 @@ int do_one_initcall(initcall_t fn)
721 if (initcall_debug) { 721 if (initcall_debug) {
722 it.rettime = ktime_get(); 722 it.rettime = ktime_get();
723 delta = ktime_sub(it.rettime, it.calltime); 723 delta = ktime_sub(it.rettime, it.calltime);
724 it.duration = (unsigned long long) delta.tv64 >> 20; 724 it.duration = (unsigned long long) delta.tv64 >> 10;
725 printk("initcall %pF returned %d after %Ld msecs\n", fn, 725 printk("initcall %pF returned %d after %Ld usecs\n", fn,
726 it.result, it.duration); 726 it.result, it.duration);
727 trace_boot(&it, fn); 727 trace_boot(&it, fn);
728 } 728 }