aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/define_trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/define_trace.h')
-rw-r--r--include/trace/define_trace.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h
index 1dfab5401511..da39b22636f7 100644
--- a/include/trace/define_trace.h
+++ b/include/trace/define_trace.h
@@ -21,11 +21,30 @@
21#undef CREATE_TRACE_POINTS 21#undef CREATE_TRACE_POINTS
22 22
23#include <linux/stringify.h> 23#include <linux/stringify.h>
24/*
25 * module.h includes tracepoints, and because ftrace.h
26 * pulls in module.h:
27 * trace/ftrace.h -> linux/ftrace_event.h -> linux/perf_event.h ->
28 * linux/ftrace.h -> linux/module.h
29 * we must include module.h here before we play with any of
30 * the TRACE_EVENT() macros, otherwise the tracepoints included
31 * by module.h may break the build.
32 */
33#include <linux/module.h>
24 34
25#undef TRACE_EVENT 35#undef TRACE_EVENT
26#define TRACE_EVENT(name, proto, args, tstruct, assign, print) \ 36#define TRACE_EVENT(name, proto, args, tstruct, assign, print) \
27 DEFINE_TRACE(name) 37 DEFINE_TRACE(name)
28 38
39#undef TRACE_EVENT_CONDITION
40#define TRACE_EVENT_CONDITION(name, proto, args, cond, tstruct, assign, print) \
41 TRACE_EVENT(name, \
42 PARAMS(proto), \
43 PARAMS(args), \
44 PARAMS(tstruct), \
45 PARAMS(assign), \
46 PARAMS(print))
47
29#undef TRACE_EVENT_FN 48#undef TRACE_EVENT_FN
30#define TRACE_EVENT_FN(name, proto, args, tstruct, \ 49#define TRACE_EVENT_FN(name, proto, args, tstruct, \
31 assign, print, reg, unreg) \ 50 assign, print, reg, unreg) \
@@ -39,6 +58,10 @@
39#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ 58#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
40 DEFINE_TRACE(name) 59 DEFINE_TRACE(name)
41 60
61#undef DEFINE_EVENT_CONDITION
62#define DEFINE_EVENT_CONDITION(template, name, proto, args, cond) \
63 DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
64
42#undef DECLARE_TRACE 65#undef DECLARE_TRACE
43#define DECLARE_TRACE(name, proto, args) \ 66#define DECLARE_TRACE(name, proto, args) \
44 DEFINE_TRACE(name) 67 DEFINE_TRACE(name)
@@ -75,9 +98,11 @@
75 98
76#undef TRACE_EVENT 99#undef TRACE_EVENT
77#undef TRACE_EVENT_FN 100#undef TRACE_EVENT_FN
101#undef TRACE_EVENT_CONDITION
78#undef DECLARE_EVENT_CLASS 102#undef DECLARE_EVENT_CLASS
79#undef DEFINE_EVENT 103#undef DEFINE_EVENT
80#undef DEFINE_EVENT_PRINT 104#undef DEFINE_EVENT_PRINT
105#undef DEFINE_EVENT_CONDITION
81#undef TRACE_HEADER_MULTI_READ 106#undef TRACE_HEADER_MULTI_READ
82#undef DECLARE_TRACE 107#undef DECLARE_TRACE
83 108