summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2008-10-02 12:59:20 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-14 10:39:11 +0200
commitcb5ab74204a6e2579d1119bf1348eb806526b12b (patch)
tree4810258d42e0370ec15cf424d5e3c6487fbd1781 /kernel/trace
parent77ae11f63befb7fc41ec256f1fcb72ca7e4160d5 (diff)
tracing/fastboot: change the printing of boot tracer according to bootgraph.pl
Change the boot tracer printing to make it parsable for the scripts/bootgraph.pl script. We have now to output two lines for each initcall, according to the printk in do_one_initcall() in init/main.c We need now the call's time and the return's time. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_boot.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index f2dac6f1cf0..7c15f3e68ba 100644
--- a/kernel/trace/trace_boot.c
+++ b/kernel/trace/trace_boot.c
@@ -52,16 +52,24 @@ static enum print_line_t initcall_print_line(struct trace_iterator *iter)
struct trace_boot *field = (struct trace_boot *)entry;
struct boot_trace *it = &field->initcall;
struct trace_seq *s = &iter->seq;
+ struct timespec calltime = ktime_to_timespec(it->calltime);
+ struct timespec rettime = ktime_to_timespec(it->rettime);
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 TRACE_TYPE_HANDLED;
- else
+ ret = trace_seq_printf(s, "[%5ld.%06ld] calling %pF @ %i\n",
+ calltime.tv_sec,
+ calltime.tv_nsec,
+ it->func, it->caller);
+ if (!ret)
return TRACE_TYPE_PARTIAL_LINE;
+ ret = trace_seq_printf(s, "[%5ld.%06ld] initcall %pF "
+ "returned %d after %lld msecs\n",
+ rettime.tv_sec,
+ rettime.tv_nsec,
+ it->func, it->result, it->duration);
+ if (!ret)
+ return TRACE_TYPE_PARTIAL_LINE;
+ return TRACE_TYPE_HANDLED;
}
return TRACE_TYPE_UNHANDLED;
}