diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-01-07 15:40:10 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-01-07 15:44:56 -0500 |
commit | 3a9f987b3141f086de27832514aad9f50a53f754 (patch) | |
tree | bac7e0819f738261f26d1f9dc584ad7312337c8c /include | |
parent | cb600d2f83c854ec3d6660063e4466431999489b (diff) |
tracing: Include module.h in define_trace.h
While doing some developing, Peter Zijlstra and I have found
that if a CREATE_TRACE_POINTS include is done before module.h
is included, it can break the build.
We have been lucky so far that this has not broke the build
since module.h is included in almost everything.
Reported-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/define_trace.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h index b0b4eb24d592..da39b22636f7 100644 --- a/include/trace/define_trace.h +++ b/include/trace/define_trace.h | |||
@@ -21,6 +21,16 @@ | |||
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) \ |