diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-12-07 22:14:36 -0500 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-12-13 12:34:23 -0500 |
commit | 614a71a26ba3d97e9fa85649db69a682b78e407d (patch) | |
tree | f0e52c9fa62f4e4230bc2ead2449caae3b30ff87 /kernel/trace/trace_kprobe.c | |
parent | 87d9b4e1c52867a45331a9a5495f6448e0c68b23 (diff) |
tracing: Pull up calls to trace_define_common_fields()
Call trace_define_common_fields() in event_create_dir() only.
This avoids trace events to handle it from their define_fields
callbacks and shrinks the kernel code size:
text data bss dec hex filename
5346802 1961864 7103260 14411926 dbe896 vmlinux.o.old
5345151 1961864 7103260 14410275 dbe223 vmlinux.o
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <4B1DC49C.8000107@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace/trace_kprobe.c')
-rw-r--r-- | kernel/trace/trace_kprobe.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index aff5f80b59b8..e3c80e925896 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c | |||
@@ -1113,10 +1113,6 @@ static int kprobe_event_define_fields(struct ftrace_event_call *event_call) | |||
1113 | struct kprobe_trace_entry field; | 1113 | struct kprobe_trace_entry field; |
1114 | struct trace_probe *tp = (struct trace_probe *)event_call->data; | 1114 | struct trace_probe *tp = (struct trace_probe *)event_call->data; |
1115 | 1115 | ||
1116 | ret = trace_define_common_fields(event_call); | ||
1117 | if (!ret) | ||
1118 | return ret; | ||
1119 | |||
1120 | DEFINE_FIELD(unsigned long, ip, FIELD_STRING_IP, 0); | 1116 | DEFINE_FIELD(unsigned long, ip, FIELD_STRING_IP, 0); |
1121 | DEFINE_FIELD(int, nargs, FIELD_STRING_NARGS, 1); | 1117 | DEFINE_FIELD(int, nargs, FIELD_STRING_NARGS, 1); |
1122 | /* Set argument names as fields */ | 1118 | /* Set argument names as fields */ |
@@ -1131,10 +1127,6 @@ static int kretprobe_event_define_fields(struct ftrace_event_call *event_call) | |||
1131 | struct kretprobe_trace_entry field; | 1127 | struct kretprobe_trace_entry field; |
1132 | struct trace_probe *tp = (struct trace_probe *)event_call->data; | 1128 | struct trace_probe *tp = (struct trace_probe *)event_call->data; |
1133 | 1129 | ||
1134 | ret = trace_define_common_fields(event_call); | ||
1135 | if (!ret) | ||
1136 | return ret; | ||
1137 | |||
1138 | DEFINE_FIELD(unsigned long, func, FIELD_STRING_FUNC, 0); | 1130 | DEFINE_FIELD(unsigned long, func, FIELD_STRING_FUNC, 0); |
1139 | DEFINE_FIELD(unsigned long, ret_ip, FIELD_STRING_RETIP, 0); | 1131 | DEFINE_FIELD(unsigned long, ret_ip, FIELD_STRING_RETIP, 0); |
1140 | DEFINE_FIELD(int, nargs, FIELD_STRING_NARGS, 1); | 1132 | DEFINE_FIELD(int, nargs, FIELD_STRING_NARGS, 1); |