summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_boot.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2008-09-29 20:31:58 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-14 10:39:03 +0200
commit9e9efffb7848fe53c334996819139b431b983ac2 (patch)
treebea4c5c2365d3c29f126cefa7f251368e8fb25c2 /kernel/trace/trace_boot.c
parent07f4e4f790895d55f46aaf89e7437da4a585989c (diff)
downloadop-kernel-dev-9e9efffb7848fe53c334996819139b431b983ac2.zip
op-kernel-dev-9e9efffb7848fe53c334996819139b431b983ac2.tar.gz
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/trace_boot.c')
-rw-r--r--kernel/trace/trace_boot.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index fa8cca1..43bde20 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)
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 =
OpenPOWER on IntegriCloud