Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54643
b: refs/heads/master
c: 8f0c45c
h: refs/heads/master
i:
  54641: 629c43d
  54639: b543c73
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed May 8, 2007
1 parent 8817a49 commit 5d3c62f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b73a7e76c1eeaa770a41554698917c3c45686a07
refs/heads/master: 8f0c45cdf87dc9141e87b0ad2fc6fff216a95f79
17 changes: 17 additions & 0 deletions trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@ static void __init do_initcalls(void)
int count = preempt_count();

for (call = __initcall_start; call < __initcall_end; call++) {
ktime_t t0, t1, delta;
char *msg = NULL;
char msgbuf[40];
int result;
Expand All @@ -657,10 +658,26 @@ static void __init do_initcalls(void)
print_fn_descriptor_symbol(": %s()",
(unsigned long) *call);
printk("\n");
t0 = ktime_get();
}

result = (*call)();

if (initcall_debug) {
t1 = ktime_get();
delta = ktime_sub(t1, t0);

printk("initcall 0x%p", *call);
print_fn_descriptor_symbol(": %s()",
(unsigned long) *call);
printk(" returned %d.\n", result);

printk("initcall 0x%p ran for %Ld msecs: ",
*call, (unsigned long long)delta.tv64 >> 20);
print_fn_descriptor_symbol("%s()\n",
(unsigned long) *call);
}

if (result && result != -ENODEV && initcall_debug) {
sprintf(msgbuf, "error code %d", result);
msg = msgbuf;
Expand Down

0 comments on commit 5d3c62f

Please sign in to comment.