aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2008-10-02 07:26:05 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 04:39:12 -0400
commit5601020feb0c3010e9e3e0131e9697ac6a06777b (patch)
tree99d1a70dbf3bba2b5ae1007c4828c28e6480214a /init
parentcb5ab74204a6e2579d1119bf1348eb806526b12b (diff)
tracing/fastboot: get the initcall name before it disappears
After some initcall traces, some initcall names may be inconsistent. That's because these functions will disappear from the .init section and also their name from the symbols table. So we have to copy the name of the function in a buffer large enough during the trace appending. It is not costly for the ring_buffer because the number of initcall entries is commonly not really large. 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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c
index 61eb66159391..8e96a0ef17f4 100644
--- a/init/main.c
+++ b/init/main.c
@@ -712,7 +712,6 @@ int do_one_initcall(initcall_t fn)
712 712
713 if (initcall_debug) { 713 if (initcall_debug) {
714 it.caller = task_pid_nr(current); 714 it.caller = task_pid_nr(current);
715 it.func = fn;
716 printk("calling %pF @ %i\n", fn, it.caller); 715 printk("calling %pF @ %i\n", fn, it.caller);
717 it.calltime = ktime_get(); 716 it.calltime = ktime_get();
718 } 717 }
@@ -725,7 +724,7 @@ int do_one_initcall(initcall_t fn)
725 it.duration = (unsigned long long) delta.tv64 >> 20; 724 it.duration = (unsigned long long) delta.tv64 >> 20;
726 printk("initcall %pF returned %d after %Ld msecs\n", fn, 725 printk("initcall %pF returned %d after %Ld msecs\n", fn,
727 it.result, it.duration); 726 it.result, it.duration);
728 trace_boot(&it); 727 trace_boot(&it, fn);
729 } 728 }
730 729
731 msgbuf[0] = 0; 730 msgbuf[0] = 0;