diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-04-23 10:38:03 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-05-14 14:33:15 -0400 |
commit | 32c0edaeaad74a7883e736ae0f3798784cfc2a80 (patch) | |
tree | e70784ed690172cb0f1b4365b93aa077d40219c9 /kernel/trace/trace_events.c | |
parent | 80decc70afc57c87eee9d6b836aec2ecacba3457 (diff) |
tracing: Remove duplicate id information in event structure
Now that the trace_event structure is embedded in the ftrace_event_call
structure, there is no need for the ftrace_event_call id field.
The id field is the same as the trace_event type field.
Removing the id and re-arranging the structure brings down the tracepoint
footprint by another 5K.
text data bss dec hex filename
4913961 1088356 861512 6863829 68bbd5 vmlinux.orig
4895024 1023812 861512 6780348 6775bc vmlinux.print
4894944 1018052 861512 6774508 675eec vmlinux.id
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r-- | kernel/trace/trace_events.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index aafe5bff8f5..8daaca5475b 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -125,7 +125,6 @@ int trace_event_raw_init(struct ftrace_event_call *call) id = register_ftrace_event(&call->event); if (!id) return -ENODEV; - call->id = id; return 0; } @@ -567,7 +566,7 @@ event_format_read(struct file *filp, char __user *ubuf, size_t cnt, trace_seq_init(s); trace_seq_printf(s, "name: %s\n", call->name); - trace_seq_printf(s, "ID: %d\n", call->id); + trace_seq_printf(s, "ID: %d\n", call->event.type); trace_seq_printf(s, "format:\n"); head = trace_get_fields(call); @@ -641,7 +640,7 @@ event_id_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos) return -ENOMEM; trace_seq_init(s); - trace_seq_printf(s, "%d\n", call->id); + trace_seq_printf(s, "%d\n", call->event.type); r = simple_read_from_buffer(ubuf, cnt, ppos, s->buffer, s->len); @@ -969,7 +968,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, enable); #ifdef CONFIG_PERF_EVENTS - if (call->id && (call->class->perf_probe || call->class->reg)) + if (call->event.type && (call->class->perf_probe || call->class->reg)) trace_create_file("id", 0444, call->dir, call, id); #endif |