aboutsummaryrefslogtreecommitdiff
path: root/kernel/trace/trace_boot.c
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-09-29 23:02:42 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 10:38:59 +0200
commit777e208d40d0953efc6fb4ab58590da3f7d8f02d (patch)
tree1e5940ccafd26c958b358f7ce85926659f12c37d /kernel/trace/trace_boot.c
parent3928a8a2d98081d1bc3c0a84a2d70e29b90ecf1c (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.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index 3657eec6b87..fa8cca1be11 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)
{
int ret = 0;
struct trace_entry *entry = iter->ent;
- struct boot_trace *it = &entry->field.initcall;
+ struct trace_boot *field = (struct trace_boot *)entry;
+ struct boot_trace *it = &field->initcall;
struct trace_seq *s = &iter->seq;
- if (iter->ent->type == TRACE_BOOT)
+ 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,
@@ -75,7 +76,7 @@ struct tracer boot_tracer __read_mostly =
void trace_boot(struct boot_trace *it)
{
struct ring_buffer_event *event;
- struct trace_entry *entry;
+ struct trace_boot *entry;
struct trace_array_cpu *data;
unsigned long irq_flags;
struct trace_array *tr = boot_trace;
@@ -91,9 +92,9 @@ void trace_boot(struct boot_trace *it)
if (!event)
goto out;
entry = ring_buffer_event_data(event);
- tracing_generic_entry_update(entry, 0);
- entry->type = TRACE_BOOT;
- entry->field.initcall = *it;
+ tracing_generic_entry_update(&entry->ent, 0);
+ entry->ent.type = TRACE_BOOT;
+ entry->initcall = *it;
ring_buffer_unlock_commit(tr->buffer, event, irq_flags);
trace_wake_up();