diff options
Diffstat (limited to 'kernel/trace/trace_boot.c')
-rw-r--r-- | kernel/trace/trace_boot.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c index 7c15f3e68ba3..b9dc2c0093ab 100644 --- a/kernel/trace/trace_boot.c +++ b/kernel/trace/trace_boot.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/debugfs.h> | 9 | #include <linux/debugfs.h> |
10 | #include <linux/ftrace.h> | 10 | #include <linux/ftrace.h> |
11 | #include <linux/kallsyms.h> | ||
11 | 12 | ||
12 | #include "trace.h" | 13 | #include "trace.h" |
13 | 14 | ||
@@ -56,17 +57,19 @@ static enum print_line_t initcall_print_line(struct trace_iterator *iter) | |||
56 | struct timespec rettime = ktime_to_timespec(it->rettime); | 57 | struct timespec rettime = ktime_to_timespec(it->rettime); |
57 | 58 | ||
58 | if (entry->type == TRACE_BOOT) { | 59 | if (entry->type == TRACE_BOOT) { |
59 | ret = trace_seq_printf(s, "[%5ld.%06ld] calling %pF @ %i\n", | 60 | ret = trace_seq_printf(s, "[%5ld.%06ld] calling %s @ %i\n", |
60 | calltime.tv_sec, | 61 | calltime.tv_sec, |
61 | calltime.tv_nsec, | 62 | calltime.tv_nsec, |
62 | it->func, it->caller); | 63 | it->func, it->caller); |
63 | if (!ret) | 64 | if (!ret) |
64 | return TRACE_TYPE_PARTIAL_LINE; | 65 | return TRACE_TYPE_PARTIAL_LINE; |
65 | ret = trace_seq_printf(s, "[%5ld.%06ld] initcall %pF " | 66 | |
67 | ret = trace_seq_printf(s, "[%5ld.%06ld] initcall %s " | ||
66 | "returned %d after %lld msecs\n", | 68 | "returned %d after %lld msecs\n", |
67 | rettime.tv_sec, | 69 | rettime.tv_sec, |
68 | rettime.tv_nsec, | 70 | rettime.tv_nsec, |
69 | it->func, it->result, it->duration); | 71 | it->func, it->result, it->duration); |
72 | |||
70 | if (!ret) | 73 | if (!ret) |
71 | return TRACE_TYPE_PARTIAL_LINE; | 74 | return TRACE_TYPE_PARTIAL_LINE; |
72 | return TRACE_TYPE_HANDLED; | 75 | return TRACE_TYPE_HANDLED; |
@@ -83,8 +86,7 @@ struct tracer boot_tracer __read_mostly = | |||
83 | .print_line = initcall_print_line, | 86 | .print_line = initcall_print_line, |
84 | }; | 87 | }; |
85 | 88 | ||
86 | 89 | void trace_boot(struct boot_trace *it, initcall_t fn) | |
87 | void trace_boot(struct boot_trace *it) | ||
88 | { | 90 | { |
89 | struct ring_buffer_event *event; | 91 | struct ring_buffer_event *event; |
90 | struct trace_boot *entry; | 92 | struct trace_boot *entry; |
@@ -95,6 +97,10 @@ void trace_boot(struct boot_trace *it) | |||
95 | if (!trace_boot_enabled) | 97 | if (!trace_boot_enabled) |
96 | return; | 98 | return; |
97 | 99 | ||
100 | /* Get its name now since this function could | ||
101 | * disappear because it is in the .init section. | ||
102 | */ | ||
103 | sprint_symbol(it->func, (unsigned long)fn); | ||
98 | preempt_disable(); | 104 | preempt_disable(); |
99 | data = tr->data[smp_processor_id()]; | 105 | data = tr->data[smp_processor_id()]; |
100 | 106 | ||