diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2008-09-29 14:31:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-14 04:39:03 -0400 |
commit | 9e9efffb7848fe53c334996819139b431b983ac2 (patch) | |
tree | bea4c5c2365d3c29f126cefa7f251368e8fb25c2 /kernel/trace | |
parent | 07f4e4f790895d55f46aaf89e7437da4a585989c (diff) |
tracing/ftrace: adapt the boot tracer to the new print_line type
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>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_boot.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c index fa8cca1be115..43bde20b95bd 100644 --- a/kernel/trace/trace_boot.c +++ b/kernel/trace/trace_boot.c | |||
@@ -45,22 +45,25 @@ static void boot_trace_ctrl_update(struct trace_array *tr) | |||
45 | stop_boot_trace(tr); | 45 | stop_boot_trace(tr); |
46 | } | 46 | } |
47 | 47 | ||
48 | static int initcall_print_line(struct trace_iterator *iter) | 48 | static enum print_line_t initcall_print_line(struct trace_iterator *iter) |
49 | { | 49 | { |
50 | int ret = 0; | 50 | int ret; |
51 | struct trace_entry *entry = iter->ent; | 51 | struct trace_entry *entry = iter->ent; |
52 | struct trace_boot *field = (struct trace_boot *)entry; | 52 | struct trace_boot *field = (struct trace_boot *)entry; |
53 | struct boot_trace *it = &field->initcall; | 53 | struct boot_trace *it = &field->initcall; |
54 | struct trace_seq *s = &iter->seq; | 54 | struct trace_seq *s = &iter->seq; |
55 | 55 | ||
56 | if (entry->type == TRACE_BOOT) | 56 | if (entry->type == TRACE_BOOT) { |
57 | ret = trace_seq_printf(s, "%pF called from %i " | 57 | ret = trace_seq_printf(s, "%pF called from %i " |
58 | "returned %d after %lld msecs\n", | 58 | "returned %d after %lld msecs\n", |
59 | it->func, it->caller, it->result, | 59 | it->func, it->caller, it->result, |
60 | it->duration); | 60 | it->duration); |
61 | if (ret) | 61 | if (ret) |
62 | return 1; | 62 | return TRACE_TYPE_HANDLED; |
63 | return 0; | 63 | else |
64 | return TRACE_TYPE_PARTIAL_LINE; | ||
65 | } | ||
66 | return TRACE_TYPE_UNHANDLED; | ||
64 | } | 67 | } |
65 | 68 | ||
66 | struct tracer boot_tracer __read_mostly = | 69 | struct tracer boot_tracer __read_mostly = |