aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
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 /include/linux
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 'include/linux')
-rw-r--r--include/linux/ftrace_event.h6
-rw-r--r--include/linux/syscalls.h6
2 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 39e71b0a3bfd..496eea898ee4 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -113,10 +113,14 @@ void tracing_record_cmdline(struct task_struct *tsk);
113 113
114struct event_filter; 114struct event_filter;
115 115
116struct ftrace_event_class {
117 char *system;
118};
119
116struct ftrace_event_call { 120struct ftrace_event_call {
117 struct list_head list; 121 struct list_head list;
122 struct ftrace_event_class *class;
118 char *name; 123 char *name;
119 char *system;
120 struct dentry *dir; 124 struct dentry *dir;
121 struct trace_event *event; 125 struct trace_event *event;
122 int enabled; 126 int enabled;
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 057929b0a651..ac5791df2506 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -134,6 +134,8 @@ struct perf_event_attr;
134#define __SC_STR_TDECL5(t, a, ...) #t, __SC_STR_TDECL4(__VA_ARGS__) 134#define __SC_STR_TDECL5(t, a, ...) #t, __SC_STR_TDECL4(__VA_ARGS__)
135#define __SC_STR_TDECL6(t, a, ...) #t, __SC_STR_TDECL5(__VA_ARGS__) 135#define __SC_STR_TDECL6(t, a, ...) #t, __SC_STR_TDECL5(__VA_ARGS__)
136 136
137extern struct ftrace_event_class event_class_syscalls;
138
137#define SYSCALL_TRACE_ENTER_EVENT(sname) \ 139#define SYSCALL_TRACE_ENTER_EVENT(sname) \
138 static const struct syscall_metadata __syscall_meta_##sname; \ 140 static const struct syscall_metadata __syscall_meta_##sname; \
139 static struct ftrace_event_call \ 141 static struct ftrace_event_call \
@@ -146,7 +148,7 @@ struct perf_event_attr;
146 __attribute__((section("_ftrace_events"))) \ 148 __attribute__((section("_ftrace_events"))) \
147 event_enter_##sname = { \ 149 event_enter_##sname = { \
148 .name = "sys_enter"#sname, \ 150 .name = "sys_enter"#sname, \
149 .system = "syscalls", \ 151 .class = &event_class_syscalls, \
150 .event = &enter_syscall_print_##sname, \ 152 .event = &enter_syscall_print_##sname, \
151 .raw_init = init_syscall_trace, \ 153 .raw_init = init_syscall_trace, \
152 .define_fields = syscall_enter_define_fields, \ 154 .define_fields = syscall_enter_define_fields, \
@@ -168,7 +170,7 @@ struct perf_event_attr;
168 __attribute__((section("_ftrace_events"))) \ 170 __attribute__((section("_ftrace_events"))) \
169 event_exit_##sname = { \ 171 event_exit_##sname = { \
170 .name = "sys_exit"#sname, \ 172 .name = "sys_exit"#sname, \
171 .system = "syscalls", \ 173 .class = &event_class_syscalls, \
172 .event = &exit_syscall_print_##sname, \ 174 .event = &exit_syscall_print_##sname, \
173 .raw_init = init_syscall_trace, \ 175 .raw_init = init_syscall_trace, \
174 .define_fields = syscall_exit_define_fields, \ 176 .define_fields = syscall_exit_define_fields, \