From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Subject: [PATCH 7/8] tracing/events: fix the include file dependencies
Date: Wed, 26 Aug 2009 00:59:52 -0400 [thread overview]
Message-ID: <20090826050052.486178528@goodmis.org> (raw)
In-Reply-To: 20090826045945.201094161@goodmis.org
[-- Attachment #1: 0007-tracing-events-fix-the-include-file-dependencies.patch --]
[-- Type: text/plain, Size: 1715 bytes --]
From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
The TRACE_EVENT depends on the include/linux/tracepoint.h first
and include/trace/ftrace.h later, if we include the ftrace.h early,
a building error will occur.
Both define TRACE_EVENT in trace_a.h and trace_b.h, if we include
those in .c file, like this:
#define CREATE_TRACE_POINTS
include <trace/events/trace_a.h>
include <trace/events/trace_b.h>
The above will not work, because the TRACE_EVENT was re-defined by
the previous .h file.
Reported-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
LKML-Reference: <4A937F5E.3020802@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/linux/tracepoint.h | 3 +--
include/trace/define_trace.h | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index 5984ed0..8170985 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -180,6 +180,7 @@ static inline void tracepoint_synchronize_unregister(void)
}
#define PARAMS(args...) args
+#endif
#ifndef TRACE_EVENT
/*
@@ -287,5 +288,3 @@ static inline void tracepoint_synchronize_unregister(void)
#define TRACE_EVENT(name, proto, args, struct, assign, print) \
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
#endif
-
-#endif
diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h
index f7a7ae1..cd150b9 100644
--- a/include/trace/define_trace.h
+++ b/include/trace/define_trace.h
@@ -56,6 +56,7 @@
#include <trace/ftrace.h>
#endif
+#undef TRACE_EVENT
#undef TRACE_HEADER_MULTI_READ
/* Only undef what we defined in this file */
--
1.6.3.3
--
next prev parent reply other threads:[~2009-08-26 5:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-26 4:59 [PATCH 0/8] [GIT PULL] tracing: updates for 2.6.32 Steven Rostedt
2009-08-26 4:59 ` [PATCH 1/8] tracing/sched: show CPU task wakes up on in trace event Steven Rostedt
2009-08-26 4:59 ` [PATCH 2/8] tracing: Add vim script to enable folding for function_graph traces Steven Rostedt
2009-08-26 4:59 ` [PATCH 3/8] tracing/filters: Add filter_type to struct ftrace_event_field Steven Rostedt
2009-08-26 4:59 ` [PATCH 4/8] tracing/filters: Add __field_ext() to TRACE_EVENT Steven Rostedt
2009-08-26 4:59 ` [PATCH 5/8] tracing/filters: Support filtering for char patches prog prog2 quilt-mail x strings Steven Rostedt
2009-08-26 4:59 ` [PATCH 6/8] ftrace: Move setting of clock-source out of options Steven Rostedt
2009-08-26 4:59 ` Steven Rostedt [this message]
2009-08-26 4:59 ` [PATCH 8/8] tracing: add comments to explain TRACE_EVENT out of protection Steven Rostedt
2009-08-26 6:27 ` [PATCH 0/8] [GIT PULL] tracing: updates for 2.6.32 Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090826050052.486178528@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=xiaoguangrong@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.