aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorAmérico Wang <xiyou.wangcong@gmail.com>2010-05-26 06:57:53 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-06-08 17:31:28 -0400
commit30dbb20e68e6f7df974b77d2350ebad5eb6f6c9e (patch)
treeb28f8232756e0de57ded858d6584724317b405ef /init
parentb0f82b81fe6bbcf78d478071f33e44554726bc81 (diff)
tracing: Remove boot tracer
The boot tracer is useless. It simply logs the initcalls but in fact these initcalls are also logged through printk while using the initcall_debug kernel parameter. Nobody seem to be using it so far. Then just remove it. Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: Chase Douglas <chase.douglas@canonical.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Li Zefan <lizf@cn.fujitsu.com> LKML-Reference: <20100526105753.GA5677@cr0.nay.redhat.com> [ remove the hooks in main.c, and the headers ] Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'init')
-rw-r--r--init/main.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/init/main.c b/init/main.c
index 3bdb152f412..94f65efdc65 100644
--- a/init/main.c
+++ b/init/main.c
@@ -70,7 +70,6 @@
70#include <linux/sfi.h> 70#include <linux/sfi.h>
71#include <linux/shmem_fs.h> 71#include <linux/shmem_fs.h>
72#include <linux/slab.h> 72#include <linux/slab.h>
73#include <trace/boot.h>
74 73
75#include <asm/io.h> 74#include <asm/io.h>
76#include <asm/bugs.h> 75#include <asm/bugs.h>
@@ -715,38 +714,33 @@ int initcall_debug;
715core_param(initcall_debug, initcall_debug, bool, 0644); 714core_param(initcall_debug, initcall_debug, bool, 0644);
716 715
717static char msgbuf[64]; 716static char msgbuf[64];
718static struct boot_trace_call call;
719static struct boot_trace_ret ret;
720 717
721int do_one_initcall(initcall_t fn) 718int do_one_initcall(initcall_t fn)
722{ 719{
723 int count = preempt_count(); 720 int count = preempt_count();
724 ktime_t calltime, delta, rettime; 721 ktime_t calltime, delta, rettime;
722 unsigned long long duration;
723 int ret;
725 724
726 if (initcall_debug) { 725 if (initcall_debug) {
727 call.caller = task_pid_nr(current); 726 printk("calling %pF @ %i\n", fn, task_pid_nr(current));
728 printk("calling %pF @ %i\n", fn, call.caller);
729 calltime = ktime_get(); 727 calltime = ktime_get();
730 trace_boot_call(&call, fn);
731 enable_boot_trace();
732 } 728 }
733 729
734 ret.result = fn(); 730 ret = fn();
735 731
736 if (initcall_debug) { 732 if (initcall_debug) {
737 disable_boot_trace();
738 rettime = ktime_get(); 733 rettime = ktime_get();
739 delta = ktime_sub(rettime, calltime); 734 delta = ktime_sub(rettime, calltime);
740 ret.duration = (unsigned long long) ktime_to_ns(delta) >> 10; 735 duration = (unsigned long long) ktime_to_ns(delta) >> 10;
741 trace_boot_ret(&ret, fn); 736 printk("initcall %pF returned %d after %lld usecs\n", fn,
742 printk("initcall %pF returned %d after %Ld usecs\n", fn, 737 ret, duration);
743 ret.result, ret.duration);
744 } 738 }
745 739
746 msgbuf[0] = 0; 740 msgbuf[0] = 0;
747 741
748 if (ret.result && ret.result != -ENODEV && initcall_debug) 742 if (ret && ret != -ENODEV && initcall_debug)
749 sprintf(msgbuf, "error code %d ", ret.result); 743 sprintf(msgbuf, "error code %d ", ret);
750 744
751 if (preempt_count() != count) { 745 if (preempt_count() != count) {
752 strlcat(msgbuf, "preemption imbalance ", sizeof(msgbuf)); 746 strlcat(msgbuf, "preemption imbalance ", sizeof(msgbuf));
@@ -760,7 +754,7 @@ int do_one_initcall(initcall_t fn)
760 printk("initcall %pF returned with %s\n", fn, msgbuf); 754 printk("initcall %pF returned with %s\n", fn, msgbuf);
761 } 755 }
762 756
763 return ret.result; 757 return ret;
764} 758}
765 759
766 760
@@ -880,7 +874,6 @@ static int __init kernel_init(void * unused)
880 smp_prepare_cpus(setup_max_cpus); 874 smp_prepare_cpus(setup_max_cpus);
881 875
882 do_pre_smp_initcalls(); 876 do_pre_smp_initcalls();
883 start_boot_trace();
884 877
885 smp_init(); 878 smp_init();
886 sched_init_smp(); 879 sched_init_smp();