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_kprobe.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_kprobe.c')
-rw-r--r-- | kernel/trace/trace_kprobe.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index d8061c3e02c9..934078bca3f9 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c | |||
@@ -960,8 +960,8 @@ static __kprobes void kprobe_trace_func(struct kprobe *kp, struct pt_regs *regs) | |||
960 | 960 | ||
961 | size = SIZEOF_KPROBE_TRACE_ENTRY(tp->nr_args); | 961 | size = SIZEOF_KPROBE_TRACE_ENTRY(tp->nr_args); |
962 | 962 | ||
963 | event = trace_current_buffer_lock_reserve(&buffer, call->id, size, | 963 | event = trace_current_buffer_lock_reserve(&buffer, call->event.type, |
964 | irq_flags, pc); | 964 | size, irq_flags, pc); |
965 | if (!event) | 965 | if (!event) |
966 | return; | 966 | return; |
967 | 967 | ||
@@ -992,8 +992,8 @@ static __kprobes void kretprobe_trace_func(struct kretprobe_instance *ri, | |||
992 | 992 | ||
993 | size = SIZEOF_KRETPROBE_TRACE_ENTRY(tp->nr_args); | 993 | size = SIZEOF_KRETPROBE_TRACE_ENTRY(tp->nr_args); |
994 | 994 | ||
995 | event = trace_current_buffer_lock_reserve(&buffer, call->id, size, | 995 | event = trace_current_buffer_lock_reserve(&buffer, call->event.type, |
996 | irq_flags, pc); | 996 | size, irq_flags, pc); |
997 | if (!event) | 997 | if (!event) |
998 | return; | 998 | return; |
999 | 999 | ||
@@ -1228,7 +1228,8 @@ static __kprobes void kprobe_perf_func(struct kprobe *kp, | |||
1228 | "profile buffer not large enough")) | 1228 | "profile buffer not large enough")) |
1229 | return; | 1229 | return; |
1230 | 1230 | ||
1231 | entry = perf_trace_buf_prepare(size, call->id, &rctx, &irq_flags); | 1231 | entry = perf_trace_buf_prepare(size, call->event.type, |
1232 | &rctx, &irq_flags); | ||
1232 | if (!entry) | 1233 | if (!entry) |
1233 | return; | 1234 | return; |
1234 | 1235 | ||
@@ -1258,7 +1259,8 @@ static __kprobes void kretprobe_perf_func(struct kretprobe_instance *ri, | |||
1258 | "profile buffer not large enough")) | 1259 | "profile buffer not large enough")) |
1259 | return; | 1260 | return; |
1260 | 1261 | ||
1261 | entry = perf_trace_buf_prepare(size, call->id, &rctx, &irq_flags); | 1262 | entry = perf_trace_buf_prepare(size, call->event.type, |
1263 | &rctx, &irq_flags); | ||
1262 | if (!entry) | 1264 | if (!entry) |
1263 | return; | 1265 | return; |
1264 | 1266 | ||
@@ -1375,8 +1377,8 @@ static int register_probe_event(struct trace_probe *tp) | |||
1375 | } | 1377 | } |
1376 | if (set_print_fmt(tp) < 0) | 1378 | if (set_print_fmt(tp) < 0) |
1377 | return -ENOMEM; | 1379 | return -ENOMEM; |
1378 | call->id = register_ftrace_event(&call->event); | 1380 | ret = register_ftrace_event(&call->event); |
1379 | if (!call->id) { | 1381 | if (!ret) { |
1380 | kfree(call->print_fmt); | 1382 | kfree(call->print_fmt); |
1381 | return -ENODEV; | 1383 | return -ENODEV; |
1382 | } | 1384 | } |