Commit 9e9efffb authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Ingo Molnar

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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Acked-by: default avatarPekka Paalanen <pq@iki.fi>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 07f4e4f7
...@@ -45,22 +45,25 @@ static void boot_trace_ctrl_update(struct trace_array *tr) ...@@ -45,22 +45,25 @@ static void boot_trace_ctrl_update(struct trace_array *tr)
stop_boot_trace(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_entry *entry = iter->ent;
struct trace_boot *field = (struct trace_boot *)entry; struct trace_boot *field = (struct trace_boot *)entry;
struct boot_trace *it = &field->initcall; struct boot_trace *it = &field->initcall;
struct trace_seq *s = &iter->seq; 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 " ret = trace_seq_printf(s, "%pF called from %i "
"returned %d after %lld msecs\n", "returned %d after %lld msecs\n",
it->func, it->caller, it->result, it->func, it->caller, it->result,
it->duration); it->duration);
if (ret) if (ret)
return 1; return TRACE_TYPE_HANDLED;
return 0; else
return TRACE_TYPE_PARTIAL_LINE;
}
return TRACE_TYPE_UNHANDLED;
} }
struct tracer boot_tracer __read_mostly = struct tracer boot_tracer __read_mostly =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment