]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
tracing/fastboot: only trace non-module initcalls
authorFrederic Weisbecker <fweisbec@gmail.com>
Fri, 3 Oct 2008 13:39:21 +0000 (15:39 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 14 Oct 2008 08:39:17 +0000 (10:39 +0200)
At this time, only built-in initcalls interest us.
We can't really produce a relevant graph if we include
the modules initcall too.

I had good results after this patch (see svg in attachment).

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/ftrace.h
init/main.c
kernel/trace/trace_boot.c

index ed53265d1f63d9b48070cb04c8928585d59a4392..5812dba4ee249d2ef0a3bc19b2ab0b6fccdbf4ad 100644 (file)
@@ -225,9 +225,11 @@ struct boot_trace {
 #ifdef CONFIG_BOOT_TRACER
 extern void trace_boot(struct boot_trace *it, initcall_t fn);
 extern void start_boot_trace(void);
+extern void stop_boot_trace(void);
 #else
 static inline void trace_boot(struct boot_trace *it, initcall_t fn) { }
 static inline void start_boot_trace(void) { }
+static inline void stop_boot_trace(void) { }
 #endif
 
 
index 8e96a0ef17f4b04ca1117c1935545c66691bab97..e7939de80f3eb515a3064b1e111bcaa9f87bbb84 100644 (file)
@@ -886,6 +886,7 @@ static int __init kernel_init(void * unused)
         * we're essentially up and running. Get rid of the
         * initmem segments and start the user-mode stuff..
         */
+       stop_boot_trace();
        init_post();
        return 0;
 }
index b9dc2c0093ab19057cea2196ddb016fc8243ed88..a7efe355965451ddc95a5d5e1fb04adf8cee974a 100644 (file)
@@ -22,11 +22,16 @@ void start_boot_trace(void)
        trace_boot_enabled = 1;
 }
 
-void stop_boot_trace(struct trace_array *tr)
+void stop_boot_trace(void)
 {
        trace_boot_enabled = 0;
 }
 
+void reset_boot_trace(struct trace_array *tr)
+{
+       stop_boot_trace();
+}
+
 static void boot_trace_init(struct trace_array *tr)
 {
        int cpu;
@@ -43,7 +48,7 @@ static void boot_trace_ctrl_update(struct trace_array *tr)
        if (tr->ctrl)
                start_boot_trace();
        else
-               stop_boot_trace(tr);
+               stop_boot_trace();
 }
 
 static enum print_line_t initcall_print_line(struct trace_iterator *iter)
@@ -81,7 +86,7 @@ struct tracer boot_tracer __read_mostly =
 {
        .name           = "initcall",
        .init           = boot_trace_init,
-       .reset          = stop_boot_trace,
+       .reset          = reset_boot_trace,
        .ctrl_update    = boot_trace_ctrl_update,
        .print_line     = initcall_print_line,
 };