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 aafe5bff8f59..8daaca5475b5 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) | |||
125 | id = register_ftrace_event(&call->event); | 125 | id = register_ftrace_event(&call->event); |
126 | if (!id) | 126 | if (!id) |
127 | return -ENODEV; | 127 | return -ENODEV; |
128 | call->id = id; | ||
129 | 128 | ||
130 | return 0; | 129 | return 0; |
131 | } | 130 | } |
@@ -567,7 +566,7 @@ event_format_read(struct file *filp, char __user *ubuf, size_t cnt, | |||
567 | trace_seq_init(s); | 566 | trace_seq_init(s); |
568 | 567 | ||
569 | trace_seq_printf(s, "name: %s\n", call->name); | 568 | trace_seq_printf(s, "name: %s\n", call->name); |
570 | trace_seq_printf(s, "ID: %d\n", call->id); | 569 | trace_seq_printf(s, "ID: %d\n", call->event.type); |
571 | trace_seq_printf(s, "format:\n"); | 570 | trace_seq_printf(s, "format:\n"); |
572 | 571 | ||
573 | head = trace_get_fields(call); | 572 | head = trace_get_fields(call); |
@@ -641,7 +640,7 @@ event_id_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos) | |||
641 | return -ENOMEM; | 640 | return -ENOMEM; |
642 | 641 | ||
643 | trace_seq_init(s); | 642 | trace_seq_init(s); |
644 | trace_seq_printf(s, "%d\n", call->id); | 643 | trace_seq_printf(s, "%d\n", call->event.type); |
645 | 644 | ||
646 | r = simple_read_from_buffer(ubuf, cnt, ppos, | 645 | r = simple_read_from_buffer(ubuf, cnt, ppos, |
647 | s->buffer, s->len); | 646 | s->buffer, s->len); |
@@ -969,7 +968,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, | |||
969 | enable); | 968 | enable); |
970 | 969 | ||
971 | #ifdef CONFIG_PERF_EVENTS | 970 | #ifdef CONFIG_PERF_EVENTS |
972 | if (call->id && (call->class->perf_probe || call->class->reg)) | 971 | if (call->event.type && (call->class->perf_probe || call->class->reg)) |
973 | trace_create_file("id", 0444, call->dir, call, | 972 | trace_create_file("id", 0444, call->dir, call, |
974 | id); | 973 | id); |
975 | #endif | 974 | #endif |