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>
This commit is contained in:
@@ -299,11 +299,9 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \
|
||||
struct ftrace_raw_##call field; \
|
||||
int ret; \
|
||||
\
|
||||
__common_field(int, type, 1); \
|
||||
__common_field(unsigned char, flags, 0); \
|
||||
__common_field(unsigned char, preempt_count, 0); \
|
||||
__common_field(int, pid, 1); \
|
||||
__common_field(int, tgid, 1); \
|
||||
ret = trace_define_common_fields(event_call); \
|
||||
if (ret) \
|
||||
return ret; \
|
||||
\
|
||||
tstruct; \
|
||||
\
|
||||
|
Reference in New Issue
Block a user