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>
Subject: [PATCH 8/8] tracing: add comments to explain TRACE_EVENT out of protection
Date: Wed, 26 Aug 2009 00:59:53 -0400 [thread overview]
Message-ID: <20090826050052.694614817@goodmis.org> (raw)
In-Reply-To: 20090826045945.201094161@goodmis.org
[-- Attachment #1: 0008-tracing-add-comments-to-explain-TRACE_EVENT-out-of-p.patch --]
[-- Type: text/plain, Size: 1460 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
The commit:
commit 5ac35daa9343936038a3c9c4f4d6d3fe6a2a7bd8
Author: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
tracing/events: fix the include file dependencies
Moved the TRACE_EVENT out of the ifdef protection of tracepoints.h
but uses the define of TRACE_EVENT itself as protection. This patch
adds comments to explain why.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/linux/tracepoint.h | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index 8170985..0341f2e 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -180,7 +180,15 @@ static inline void tracepoint_synchronize_unregister(void)
}
#define PARAMS(args...) args
-#endif
+
+#endif /* _LINUX_TRACEPOINT_H */
+
+/*
+ * Note: we keep the TRACE_EVENT outside the include file ifdef protection.
+ * This is due to the way trace events work. If a file includes two
+ * trace event headers under one "CREATE_TRACE_POINTS" the first include
+ * will override the TRACE_EVENT and break the second include.
+ */
#ifndef TRACE_EVENT
/*
@@ -287,4 +295,5 @@ 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 /* ifdef TRACE_EVENT (see note above) */
--
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 ` [PATCH 7/8] tracing/events: fix the include file dependencies Steven Rostedt
2009-08-26 4:59 ` Steven Rostedt [this message]
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.694614817@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 \
/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