diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-08-19 03:54:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-19 09:02:24 -0400 |
commit | e647d6b314266adb904d4b84973eda0afa856946 (patch) | |
tree | e4f18b57d37a25910b3d19b6c2461f87db0084a3 /include/linux | |
parent | 14be96c9716cb8c46dca94bd890defd7856e0734 (diff) |
tracing/events: Add trace_define_common_fields()
Extract duplicate code. Also prepare for the later patch.
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: <4A8BAFB8.1010304@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/ftrace_event.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 35b3a4a5ba8..427cbae47f8 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -142,6 +142,7 @@ extern int filter_current_check_discard(struct ftrace_event_call *call, | |||
142 | 142 | ||
143 | extern int trace_define_field(struct ftrace_event_call *call, char *type, | 143 | extern int trace_define_field(struct ftrace_event_call *call, char *type, |
144 | char *name, int offset, int size, int is_signed); | 144 | char *name, int offset, int size, int is_signed); |
145 | extern int trace_define_common_fields(struct ftrace_event_call *call); | ||
145 | 146 | ||
146 | #define is_signed_type(type) (((type)(-1)) < 0) | 147 | #define is_signed_type(type) (((type)(-1)) < 0) |
147 | 148 | ||
@@ -166,11 +167,4 @@ do { \ | |||
166 | __trace_printk(ip, fmt, ##args); \ | 167 | __trace_printk(ip, fmt, ##args); \ |
167 | } while (0) | 168 | } while (0) |
168 | 169 | ||
169 | #define __common_field(type, item, is_signed) \ | ||
170 | ret = trace_define_field(event_call, #type, "common_" #item, \ | ||
171 | offsetof(typeof(field.ent), item), \ | ||
172 | sizeof(field.ent.item), is_signed); \ | ||
173 | if (ret) \ | ||
174 | return ret; | ||
175 | |||
176 | #endif /* _LINUX_FTRACE_EVENT_H */ | 170 | #endif /* _LINUX_FTRACE_EVENT_H */ |