From: tip-bot for Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
rostedt@goodmis.org, yjwei@cn.fujitsu.com,
xiaoguangrong@cn.fujitsu.com, tglx@linutronix.de
Subject: [tip:tracing/core] tracing/events: fix the include file dependencies
Date: Wed, 26 Aug 2009 07:23:54 GMT [thread overview]
Message-ID: <tip-5ac35daa9343936038a3c9c4f4d6d3fe6a2a7bd8@git.kernel.org> (raw)
In-Reply-To: <4A937F5E.3020802@cn.fujitsu.com>
Commit-ID: 5ac35daa9343936038a3c9c4f4d6d3fe6a2a7bd8
Gitweb: http://git.kernel.org/tip/5ac35daa9343936038a3c9c4f4d6d3fe6a2a7bd8
Author: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
AuthorDate: Tue, 25 Aug 2009 14:06:22 +0800
Committer: Steven Rostedt <rostedt@goodmis.org>
CommitDate: Wed, 26 Aug 2009 00:32:09 -0400
tracing/events: fix the include file dependencies
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 */
next prev parent reply other threads:[~2009-08-26 7:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 6:04 [PATCH 1/2] trace_evetns: fix napi's tracepoint Xiao Guangrong
2009-08-25 6:06 ` [PATCH 2/2] trace_events: fix the include file dependencies Xiao Guangrong
2009-08-25 13:30 ` Frederic Weisbecker
2009-08-25 22:59 ` Steven Rostedt
2009-08-25 21:35 ` Frederic Weisbecker
2009-08-26 7:23 ` tip-bot for Xiao Guangrong [this message]
2009-08-25 6:45 ` [PATCH 1/2] trace_evetns: fix napi's tracepoint Xiao Guangrong
2009-08-25 6:49 ` [PATCH 1/2] trace_events: " Xiao Guangrong
2009-08-25 7:58 ` Ingo Molnar
2009-08-25 10:57 ` Neil Horman
2009-08-26 0:49 ` Xiao Guangrong
2009-08-26 5:20 ` Xiao Guangrong
2009-08-26 5:40 ` Xiao Guangrong
2009-08-26 14:01 ` Steven Rostedt
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=tip-5ac35daa9343936038a3c9c4f4d6d3fe6a2a7bd8@git.kernel.org \
--to=xiaoguangrong@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=yjwei@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome