diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2008-10-02 06:59:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-14 04:39:11 -0400 |
commit | cb5ab74204a6e2579d1119bf1348eb806526b12b (patch) | |
tree | 4810258d42e0370ec15cf424d5e3c6487fbd1781 /kernel | |
parent | 77ae11f63befb7fc41ec256f1fcb72ca7e4160d5 (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')
-rw-r--r-- | kernel/trace/trace_boot.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c index f2dac6f1cf06..7c15f3e68ba3 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) | |||
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 | struct timespec calltime = ktime_to_timespec(it->calltime); | ||
56 | struct timespec rettime = ktime_to_timespec(it->rettime); | ||
55 | 57 | ||
56 | if (entry->type == TRACE_BOOT) { | 58 | if (entry->type == TRACE_BOOT) { |
57 | ret = trace_seq_printf(s, "%pF called from %i " | 59 | ret = trace_seq_printf(s, "[%5ld.%06ld] calling %pF @ %i\n", |
58 | "returned %d after %lld msecs\n", | 60 | calltime.tv_sec, |
59 | it->func, it->caller, it->result, | 61 | calltime.tv_nsec, |
60 | it->duration); | 62 | it->func, it->caller); |
61 | if (ret) | 63 | if (!ret) |
62 | return TRACE_TYPE_HANDLED; | ||
63 | else | ||
64 | return TRACE_TYPE_PARTIAL_LINE; | 64 | return TRACE_TYPE_PARTIAL_LINE; |
65 | ret = trace_seq_printf(s, "[%5ld.%06ld] initcall %pF " | ||
66 | "returned %d after %lld msecs\n", | ||
67 | rettime.tv_sec, | ||
68 | rettime.tv_nsec, | ||
69 | it->func, it->result, it->duration); | ||
70 | if (!ret) | ||
71 | return TRACE_TYPE_PARTIAL_LINE; | ||
72 | return TRACE_TYPE_HANDLED; | ||
65 | } | 73 | } |
66 | return TRACE_TYPE_UNHANDLED; | 74 | return TRACE_TYPE_UNHANDLED; |
67 | } | 75 | } |