aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-04-20 10:47:33 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-05-14 09:33:49 -0400
commit8f0820183056ad26dabc0202115848a92f1143fc (patch)
treec9e1cb9d41e37d5075704efbde3c97121820e0c5 /kernel/trace/trace_events.c
parent23e117fa44429cc054cb27d5621d64e4ced91e52 (diff)
tracing: Create class struct for events
This patch creates a ftrace_event_class struct that event structs point to. This class struct will be made to hold information to modify the events. Currently the class struct only holds the events system name. This patch slightly increases the size, but this change lays the ground work of other changes to make the footprint of tracepoints smaller. With 82 standard tracepoints, and 618 system call tracepoints (two tracepoints per syscall: enter and exit): text data bss dec hex filename 4913961 1088356 861512 6863829 68bbd5 vmlinux.orig 4914025 1088868 861512 6864405 68be15 vmlinux.class This patch also cleans up some stale comments in ftrace.h. v2: Fixed missing semi-colon in macro. Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Acked-by: Masami Hiramatsu <mhiramat@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r--kernel/trace/trace_events.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index c697c7043349..2f54b48d3632 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -176,10 +176,10 @@ static int __ftrace_set_clr_event(const char *match, const char *sub,
176 176
177 if (match && 177 if (match &&
178 strcmp(match, call->name) != 0 && 178 strcmp(match, call->name) != 0 &&
179 strcmp(match, call->system) != 0) 179 strcmp(match, call->class->system) != 0)
180 continue; 180 continue;
181 181
182 if (sub && strcmp(sub, call->system) != 0) 182 if (sub && strcmp(sub, call->class->system) != 0)
183 continue; 183 continue;
184 184
185 if (event && strcmp(event, call->name) != 0) 185 if (event && strcmp(event, call->name) != 0)
@@ -355,8 +355,8 @@ static int t_show(struct seq_file *m, void *v)
355{ 355{
356 struct ftrace_event_call *call = v; 356 struct ftrace_event_call *call = v;
357 357
358 if (strcmp(call->system, TRACE_SYSTEM) != 0) 358 if (strcmp(call->class->system, TRACE_SYSTEM) != 0)
359 seq_printf(m, "%s:", call->system); 359 seq_printf(m, "%s:", call->class->system);
360 seq_printf(m, "%s\n", call->name); 360 seq_printf(m, "%s\n", call->name);
361 361
362 return 0; 362 return 0;
@@ -453,7 +453,7 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
453 if (!call->name || !call->regfunc) 453 if (!call->name || !call->regfunc)
454 continue; 454 continue;
455 455
456 if (system && strcmp(call->system, system) != 0) 456 if (system && strcmp(call->class->system, system) != 0)
457 continue; 457 continue;
458 458
459 /* 459 /*
@@ -925,8 +925,8 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
925 * If the trace point header did not define TRACE_SYSTEM 925 * If the trace point header did not define TRACE_SYSTEM
926 * then the system would be called "TRACE_SYSTEM". 926 * then the system would be called "TRACE_SYSTEM".
927 */ 927 */
928 if (strcmp(call->system, TRACE_SYSTEM) != 0) 928 if (strcmp(call->class->system, TRACE_SYSTEM) != 0)
929 d_events = event_subsystem_dir(call->system, d_events); 929 d_events = event_subsystem_dir(call->class->system, d_events);
930 930
931 call->dir = debugfs_create_dir(call->name, d_events); 931 call->dir = debugfs_create_dir(call->name, d_events);
932 if (!call->dir) { 932 if (!call->dir) {
@@ -1041,7 +1041,7 @@ static void __trace_remove_event_call(struct ftrace_event_call *call)
1041 list_del(&call->list); 1041 list_del(&call->list);
1042 trace_destroy_fields(call); 1042 trace_destroy_fields(call);
1043 destroy_preds(call); 1043 destroy_preds(call);
1044 remove_subsystem_dir(call->system); 1044 remove_subsystem_dir(call->class->system);
1045} 1045}
1046 1046
1047/* Remove an event_call */ 1047/* Remove an event_call */
@@ -1399,8 +1399,8 @@ static __init void event_trace_self_tests(void)
1399 * syscalls as we test. 1399 * syscalls as we test.
1400 */ 1400 */
1401#ifndef CONFIG_EVENT_TRACE_TEST_SYSCALLS 1401#ifndef CONFIG_EVENT_TRACE_TEST_SYSCALLS
1402 if (call->system && 1402 if (call->class->system &&
1403 strcmp(call->system, "syscalls") == 0) 1403 strcmp(call->class->system, "syscalls") == 0)
1404 continue; 1404 continue;
1405#endif 1405#endif
1406 1406