]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tracing/ftrace: adapt the boot tracer to the new print_line type
authorFrederic Weisbecker <fweisbec@gmail.com>
Mon, 29 Sep 2008 18:31:58 +0000 (20:31 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 14 Oct 2008 08:39:03 +0000 (10:39 +0200)
This patch adapts the boot tracer to the new type of the
print_line callback.

It still relays entries it doesn't support to default output
functions.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_boot.c

index fa8cca1be115627ff57004809828517dc63aea31..43bde20b95bdb56ad72f99f7a082c42ca8b4c064 100644 (file)
@@ -45,22 +45,25 @@ static void boot_trace_ctrl_update(struct trace_array *tr)
                stop_boot_trace(tr);
 }
 
-static int initcall_print_line(struct trace_iterator *iter)
+static enum print_line_t initcall_print_line(struct trace_iterator *iter)
 {
-       int ret = 0;
+       int ret;
        struct trace_entry *entry = iter->ent;
        struct trace_boot *field = (struct trace_boot *)entry;
        struct boot_trace *it = &field->initcall;
        struct trace_seq *s = &iter->seq;
 
-       if (entry->type == TRACE_BOOT)
+       if (entry->type == TRACE_BOOT) {
                ret = trace_seq_printf(s, "%pF called from %i "
                                       "returned %d after %lld msecs\n",
                                       it->func, it->caller, it->result,
                                       it->duration);
-       if (ret)
-               return 1;
-       return 0;
+               if (ret)
+                       return TRACE_TYPE_HANDLED;
+               else
+                       return TRACE_TYPE_PARTIAL_LINE;
+       }
+       return TRACE_TYPE_UNHANDLED;
 }
 
 struct tracer boot_tracer __read_mostly =