mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-05-02 18:15:03 -04:00
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:
@@ -189,11 +189,9 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \
|
||||
struct args field; \
|
||||
int ret; \
|
||||
\
|
||||
__common_field(unsigned char, type, 0); \
|
||||
__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