Fix: check that class and instance prototype match
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 17 Apr 2015 20:30:17 +0000 (16:30 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 17 Apr 2015 20:33:04 +0000 (16:33 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/lttng-events.h

index e6d8f4477dfab459d744e92be27db55c20a96cea..29b44af71d9316b0701adfba64dc4312c3c403e7 100644 (file)
@@ -138,6 +138,40 @@ void trace_##_name(void);
 
 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
 
+/*
+ * Stage 1.1 of the trace events.
+ *
+ * Create dummy trace prototypes for each event class, and for each used
+ * template. This will allow checking whether the prototypes from the
+ * class and the instance using the class actually match.
+ */
+
+#include "lttng-events-reset.h"        /* Reset all macros within TRACE_EVENT */
+
+#undef TP_PROTO
+#define TP_PROTO(...)  __VA_ARGS__
+
+#undef TP_ARGS
+#define TP_ARGS(...)   __VA_ARGS__
+
+#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP
+#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \
+void __event_template_proto___##_template(_proto);
+
+#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS
+#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \
+void __event_template_proto___##_template(void);
+
+#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \
+void __event_template_proto___##_name(_proto);
+
+#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \
+void __event_template_proto___##_name(void);
+
+#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
+
 /*
  * Stage 2 of the trace events.
  *
This page took 0.026798 seconds and 4 git commands to generate.