aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2008-10-31 07:57:20 -0400
committerIngo Molnar <mingo@elte.hu>2008-11-04 11:14:02 -0500
commit71566a0d161edec70361b7f90f6e54af6a6d5d05 (patch)
tree78d2d790ed4e20c179d2f61f2ed50ecbb6d5a451 /init
parent7a895f53cda9d9362c30144e42c124a1ae996b9e (diff)
tracing/fastboot: Enable boot tracing only during initcalls
Impact: modify boot tracer We used to disable the initcall tracing at a specified time (IE: end of builtin initcalls). But we don't need it anymore. It will be stopped when initcalls are finished. However we want two things: _Start this tracing only after pre-smp initcalls are finished. _Since we are planning to trace sched_switches at the same time, we want to enable them only during the initcall execution. For this purpose, this patch introduce two functions to enable/disable the sched_switch tracing during boot. 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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/init/main.c b/init/main.c
index 7e117a231af1..4b03cd5656ca 100644
--- a/init/main.c
+++ b/init/main.c
@@ -711,6 +711,7 @@ int do_one_initcall(initcall_t fn)
711 it.caller = task_pid_nr(current); 711 it.caller = task_pid_nr(current);
712 printk("calling %pF @ %i\n", fn, it.caller); 712 printk("calling %pF @ %i\n", fn, it.caller);
713 it.calltime = ktime_get(); 713 it.calltime = ktime_get();
714 enable_boot_trace();
714 } 715 }
715 716
716 it.result = fn(); 717 it.result = fn();
@@ -722,6 +723,7 @@ int do_one_initcall(initcall_t fn)
722 printk("initcall %pF returned %d after %Ld usecs\n", fn, 723 printk("initcall %pF returned %d after %Ld usecs\n", fn,
723 it.result, it.duration); 724 it.result, it.duration);
724 trace_boot(&it, fn); 725 trace_boot(&it, fn);
726 disable_boot_trace();
725 } 727 }
726 728
727 msgbuf[0] = 0; 729 msgbuf[0] = 0;
@@ -882,7 +884,7 @@ static int __init kernel_init(void * unused)
882 * we're essentially up and running. Get rid of the 884 * we're essentially up and running. Get rid of the
883 * initmem segments and start the user-mode stuff.. 885 * initmem segments and start the user-mode stuff..
884 */ 886 */
885 stop_boot_trace(); 887
886 init_post(); 888 init_post();
887 return 0; 889 return 0;
888} 890}