aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_syscalls.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-04-22 11:46:44 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-05-14 14:20:30 -0400
commit0405ab80aa94afb13bf9ac4a6fc9f2923d4b9114 (patch)
tree43eedc09bb15ecfda26adb661d59badeacea0de6 /kernel/trace/trace_syscalls.c
parent2e33af029556cb8bd22bf4f86f42d540249177ea (diff)
tracing: Move raw_init from events to class
The raw_init function pointer in the event is used to initialize various kinds of events. The type of initialization needed is usually classed to the kind of event it is. Two events with the same class will always have the same initialization function, so it makes sense to move this to the class structure. Perhaps even making a special system structure would work since the initialization is the same for all events within a system. But since there's no system structure (yet), this will just move it to the class. text data bss dec hex filename 4913961 1088356 861512 6863829 68bbd5 vmlinux.orig 4900375 1053380 861512 6815267 67fe23 vmlinux.fields 4900382 1048964 861512 6810858 67ecea vmlinux.init The text grew very slightly, but this is a constant growth that happened with the changing of the C files that call the init code. The bigger savings is the data which will be saved the more events share a class. 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_syscalls.c')
-rw-r--r--kernel/trace/trace_syscalls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index cceccf0d2e91..1c1b9bf3ccc6 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -44,6 +44,7 @@ struct ftrace_event_class event_class_syscall_enter = {
44 .reg = syscall_enter_register, 44 .reg = syscall_enter_register,
45 .define_fields = syscall_enter_define_fields, 45 .define_fields = syscall_enter_define_fields,
46 .get_fields = syscall_get_enter_fields, 46 .get_fields = syscall_get_enter_fields,
47 .raw_init = init_syscall_trace,
47}; 48};
48 49
49struct ftrace_event_class event_class_syscall_exit = { 50struct ftrace_event_class event_class_syscall_exit = {
@@ -51,6 +52,7 @@ struct ftrace_event_class event_class_syscall_exit = {
51 .reg = syscall_exit_register, 52 .reg = syscall_exit_register,
52 .define_fields = syscall_exit_define_fields, 53 .define_fields = syscall_exit_define_fields,
53 .get_fields = syscall_get_exit_fields, 54 .get_fields = syscall_get_exit_fields,
55 .raw_init = init_syscall_trace,
54}; 56};
55 57
56extern unsigned long __start_syscalls_metadata[]; 58extern unsigned long __start_syscalls_metadata[];