diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2008-09-29 23:02:42 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-14 04:38:59 -0400 |
commit | 777e208d40d0953efc6fb4ab58590da3f7d8f02d (patch) | |
tree | 1e5940ccafd26c958b358f7ce85926659f12c37d /kernel/trace/trace_boot.c | |
parent | 3928a8a2d98081d1bc3c0a84a2d70e29b90ecf1c (diff) |
ftrace: take advantage of variable length entries
Now that the underlining ring buffer for ftrace now hold variable length
entries, we can take advantage of this by only storing the size of the
actual event into the buffer. This happens to increase the number of
entries in the buffer dramatically.
We can also get rid of the "trace_cont" operation, but I'm keeping that
until we have no more users. Some of the ftrace tracers can now change
their code to adapt to this new feature.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_boot.c')
-rw-r--r-- | kernel/trace/trace_boot.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c index 3657eec6b87d..fa8cca1be115 100644 --- a/kernel/trace/trace_boot.c +++ b/kernel/trace/trace_boot.c | |||
@@ -49,10 +49,11 @@ static int initcall_print_line(struct trace_iterator *iter) | |||
49 | { | 49 | { |
50 | int ret = 0; | 50 | int ret = 0; |
51 | struct trace_entry *entry = iter->ent; | 51 | struct trace_entry *entry = iter->ent; |
52 | struct boot_trace *it = &entry->field.initcall; | 52 | struct trace_boot *field = (struct trace_boot *)entry; |
53 | struct boot_trace *it = &field->initcall; | ||
53 | struct trace_seq *s = &iter->seq; | 54 | struct trace_seq *s = &iter->seq; |
54 | 55 | ||
55 | if (iter->ent->type == TRACE_BOOT) | 56 | if (entry->type == TRACE_BOOT) |
56 | ret = trace_seq_printf(s, "%pF called from %i " | 57 | ret = trace_seq_printf(s, "%pF called from %i " |
57 | "returned %d after %lld msecs\n", | 58 | "returned %d after %lld msecs\n", |
58 | it->func, it->caller, it->result, | 59 | it->func, it->caller, it->result, |
@@ -75,7 +76,7 @@ struct tracer boot_tracer __read_mostly = | |||
75 | void trace_boot(struct boot_trace *it) | 76 | void trace_boot(struct boot_trace *it) |
76 | { | 77 | { |
77 | struct ring_buffer_event *event; | 78 | struct ring_buffer_event *event; |
78 | struct trace_entry *entry; | 79 | struct trace_boot *entry; |
79 | struct trace_array_cpu *data; | 80 | struct trace_array_cpu *data; |
80 | unsigned long irq_flags; | 81 | unsigned long irq_flags; |
81 | struct trace_array *tr = boot_trace; | 82 | struct trace_array *tr = boot_trace; |
@@ -91,9 +92,9 @@ void trace_boot(struct boot_trace *it) | |||
91 | if (!event) | 92 | if (!event) |
92 | goto out; | 93 | goto out; |
93 | entry = ring_buffer_event_data(event); | 94 | entry = ring_buffer_event_data(event); |
94 | tracing_generic_entry_update(entry, 0); | 95 | tracing_generic_entry_update(&entry->ent, 0); |
95 | entry->type = TRACE_BOOT; | 96 | entry->ent.type = TRACE_BOOT; |
96 | entry->field.initcall = *it; | 97 | entry->initcall = *it; |
97 | ring_buffer_unlock_commit(tr->buffer, event, irq_flags); | 98 | ring_buffer_unlock_commit(tr->buffer, event, irq_flags); |
98 | 99 | ||
99 | trace_wake_up(); | 100 | trace_wake_up(); |