aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-12-07 22:14:20 -0500
committerFrederic Weisbecker <fweisbec@gmail.com>2009-12-13 12:34:23 -0500
commit87d9b4e1c52867a45331a9a5495f6448e0c68b23 (patch)
treedcac60fbfa60eec687d723fad780165cec5fd9b1 /include/linux
parent4819568f23a8bef0ca99b740ca60fe2450ab0aac (diff)
tracing: Extract duplicate ftrace_raw_init_event_foo()
Use a generic trace_event_raw_init() function for all event's raw_init callbacks (but kprobes) instead of defining the same version for each of these. This shrinks the kernel code: text data bss dec hex filename 5355293 1961928 7103260 14420481 dc0a01 vmlinux.o.old 5346802 1961864 7103260 14411926 dbe896 vmlinux.o raw_init can't be removed, because ftrace events and kprobe events use different raw_init callbacks. Though it's possible to totally remove raw_init, I choose to leave it as it is for now. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: Jason Baron <jbaron@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> LKML-Reference: <4B1DC48C.7080603@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ftrace_event.h1
-rw-r--r--include/linux/syscalls.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 38f8d6553831..ea44b8911094 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -158,6 +158,7 @@ enum {
158 FILTER_PTR_STRING, 158 FILTER_PTR_STRING,
159}; 159};
160 160
161extern int trace_event_raw_init(struct ftrace_event_call *call);
161extern int trace_define_common_fields(struct ftrace_event_call *call); 162extern int trace_define_common_fields(struct ftrace_event_call *call);
162extern int trace_define_field(struct ftrace_event_call *call, const char *type, 163extern int trace_define_field(struct ftrace_event_call *call, const char *type,
163 const char *name, int offset, int size, 164 const char *name, int offset, int size,
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index bc70c5810fec..94ac28437bef 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -145,7 +145,7 @@ struct perf_event_attr;
145 .name = "sys_enter"#sname, \ 145 .name = "sys_enter"#sname, \
146 .system = "syscalls", \ 146 .system = "syscalls", \
147 .event = &enter_syscall_print_##sname, \ 147 .event = &enter_syscall_print_##sname, \
148 .raw_init = init_syscall_trace, \ 148 .raw_init = trace_event_raw_init, \
149 .show_format = syscall_enter_format, \ 149 .show_format = syscall_enter_format, \
150 .define_fields = syscall_enter_define_fields, \ 150 .define_fields = syscall_enter_define_fields, \
151 .regfunc = reg_event_syscall_enter, \ 151 .regfunc = reg_event_syscall_enter, \
@@ -167,7 +167,7 @@ struct perf_event_attr;
167 .name = "sys_exit"#sname, \ 167 .name = "sys_exit"#sname, \
168 .system = "syscalls", \ 168 .system = "syscalls", \
169 .event = &exit_syscall_print_##sname, \ 169 .event = &exit_syscall_print_##sname, \
170 .raw_init = init_syscall_trace, \ 170 .raw_init = trace_event_raw_init, \
171 .show_format = syscall_exit_format, \ 171 .show_format = syscall_exit_format, \
172 .define_fields = syscall_exit_define_fields, \ 172 .define_fields = syscall_exit_define_fields, \
173 .regfunc = reg_event_syscall_exit, \ 173 .regfunc = reg_event_syscall_exit, \