aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.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_events.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_events.c')
-rw-r--r--kernel/trace/trace_events.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index acc0f55742c3..8e94255a45e7 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1008,8 +1008,8 @@ static int __trace_add_event_call(struct ftrace_event_call *call)
1008 if (!call->name) 1008 if (!call->name)
1009 return -EINVAL; 1009 return -EINVAL;
1010 1010
1011 if (call->raw_init) { 1011 if (call->class->raw_init) {
1012 ret = call->raw_init(call); 1012 ret = call->class->raw_init(call);
1013 if (ret < 0) { 1013 if (ret < 0) {
1014 if (ret != -ENOSYS) 1014 if (ret != -ENOSYS)
1015 pr_warning("Could not initialize trace " 1015 pr_warning("Could not initialize trace "
@@ -1170,8 +1170,8 @@ static void trace_module_add_events(struct module *mod)
1170 /* The linker may leave blanks */ 1170 /* The linker may leave blanks */
1171 if (!call->name) 1171 if (!call->name)
1172 continue; 1172 continue;
1173 if (call->raw_init) { 1173 if (call->class->raw_init) {
1174 ret = call->raw_init(call); 1174 ret = call->class->raw_init(call);
1175 if (ret < 0) { 1175 if (ret < 0) {
1176 if (ret != -ENOSYS) 1176 if (ret != -ENOSYS)
1177 pr_warning("Could not initialize trace " 1177 pr_warning("Could not initialize trace "
@@ -1324,8 +1324,8 @@ static __init int event_trace_init(void)
1324 /* The linker may leave blanks */ 1324 /* The linker may leave blanks */
1325 if (!call->name) 1325 if (!call->name)
1326 continue; 1326 continue;
1327 if (call->raw_init) { 1327 if (call->class->raw_init) {
1328 ret = call->raw_init(call); 1328 ret = call->class->raw_init(call);
1329 if (ret < 0) { 1329 if (ret < 0) {
1330 if (ret != -ENOSYS) 1330 if (ret != -ENOSYS)
1331 pr_warning("Could not initialize trace " 1331 pr_warning("Could not initialize trace "