diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-08-19 03:53:52 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-19 09:02:23 -0400 |
commit | 14be96c9716cb8c46dca94bd890defd7856e0734 (patch) | |
tree | d9a064f3191182f16ff01176b17c4dda073d8dc8 | |
parent | 10a5b66f625904ad5a2867cf7a28073e1236ff32 (diff) |
tracing/events: Add ftrace_event_call param to define_fields()
This parameter is needed by syscall events to add define_fields()
handler.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A8BAF90.6060801@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | include/linux/ftrace_event.h | 2 | ||||
-rw-r--r-- | include/trace/ftrace.h | 3 | ||||
-rw-r--r-- | kernel/trace/trace_events.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace_export.c | 5 |
4 files changed, 5 insertions, 7 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 189806b6e69e..35b3a4a5ba86 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -118,7 +118,7 @@ struct ftrace_event_call { | |||
118 | int (*raw_init)(void); | 118 | int (*raw_init)(void); |
119 | int (*show_format)(struct ftrace_event_call *call, | 119 | int (*show_format)(struct ftrace_event_call *call, |
120 | struct trace_seq *s); | 120 | struct trace_seq *s); |
121 | int (*define_fields)(void); | 121 | int (*define_fields)(struct ftrace_event_call *); |
122 | struct list_head fields; | 122 | struct list_head fields; |
123 | int filter_active; | 123 | int filter_active; |
124 | struct event_filter *filter; | 124 | struct event_filter *filter; |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index b250b0616571..4e81c9b37515 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -294,10 +294,9 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ | |||
294 | #undef TRACE_EVENT | 294 | #undef TRACE_EVENT |
295 | #define TRACE_EVENT(call, proto, args, tstruct, func, print) \ | 295 | #define TRACE_EVENT(call, proto, args, tstruct, func, print) \ |
296 | int \ | 296 | int \ |
297 | ftrace_define_fields_##call(void) \ | 297 | ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ |
298 | { \ | 298 | { \ |
299 | struct ftrace_raw_##call field; \ | 299 | struct ftrace_raw_##call field; \ |
300 | struct ftrace_event_call *event_call = &event_##call; \ | ||
301 | int ret; \ | 300 | int ret; \ |
302 | \ | 301 | \ |
303 | __common_field(int, type, 1); \ | 302 | __common_field(int, type, 1); \ |
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index b568ade8f453..af8fb8ebef0b 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -941,7 +941,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, | |||
941 | id); | 941 | id); |
942 | 942 | ||
943 | if (call->define_fields) { | 943 | if (call->define_fields) { |
944 | ret = call->define_fields(); | 944 | ret = call->define_fields(call); |
945 | if (ret < 0) { | 945 | if (ret < 0) { |
946 | pr_warning("Could not initialize trace point" | 946 | pr_warning("Could not initialize trace point" |
947 | " events/%s\n", call->name); | 947 | " events/%s\n", call->name); |
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c index 956d4bc675e5..cf2c752a25bf 100644 --- a/kernel/trace/trace_export.c +++ b/kernel/trace/trace_export.c | |||
@@ -119,7 +119,7 @@ ftrace_format_##call(struct ftrace_event_call *unused, \ | |||
119 | 119 | ||
120 | #undef TRACE_EVENT_FORMAT | 120 | #undef TRACE_EVENT_FORMAT |
121 | #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ | 121 | #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ |
122 | int ftrace_define_fields_##call(void); \ | 122 | int ftrace_define_fields_##call(struct ftrace_event_call *event_call); \ |
123 | static int ftrace_raw_init_event_##call(void); \ | 123 | static int ftrace_raw_init_event_##call(void); \ |
124 | \ | 124 | \ |
125 | struct ftrace_event_call __used \ | 125 | struct ftrace_event_call __used \ |
@@ -184,9 +184,8 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
184 | #undef TRACE_EVENT_FORMAT | 184 | #undef TRACE_EVENT_FORMAT |
185 | #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ | 185 | #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ |
186 | int \ | 186 | int \ |
187 | ftrace_define_fields_##call(void) \ | 187 | ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ |
188 | { \ | 188 | { \ |
189 | struct ftrace_event_call *event_call = &event_##call; \ | ||
190 | struct args field; \ | 189 | struct args field; \ |
191 | int ret; \ | 190 | int ret; \ |
192 | \ | 191 | \ |