Hi,
I'm not very familiar with the tracing framework, but I will try to
comment on your questions.
On 25/08/13 09:59, Rob Landley wrote:
On 08/22/2013 04:49:31 PM, Zoltan Kiss wrote:
+#if !defined(_TRACE_SUBSYS_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_SUBSYS_H
But this makes no sense to me: why is it needed? (I.E. why must it be
block copied into each _user_ of tracepoints?)
This is to prevent header reinclusion, the second condition makes it
possible to include it again from trace/define_trace.h
#include <linux/tracepoint.h>
@@ -48,10 +54,16 @@ DECLARE_TRACE(subsys_eventname,
TP_PROTO(int firstarg, struct task_struct *p),
TP_ARGS(firstarg, p));
+#endif /* _TRACE_SUBSYS_H */
+
+/* This part must be outside protection */
+#include <trace/define_trace.h>
+
Why? (Both why do you need to #include a header outside a multiple
inclusion guard, and why is the additional header needed at all in
_every_ subsystem trace header?)
I see only one inclusion guard here, the one above. define_trace.h
should take effect at only one place, where CREATE_TRACE_POINTS is
defined, to create the tracepoints exactly once. However I don't see as
well why it should be outside protection. Maybe because the intentional
header reinclusion in it?
Regards,
Zoli
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html