Fix prototype check
[lttng-modules.git] / probes / lttng-events.h
index 6631fbcd1ce82d21dc1ca1de667f01be6488c455..a47320b12487d399e88e0fbc0fed76c1db204d71 100644 (file)
@@ -1,7 +1,8 @@
 #include <lttng.h>
 #include <lttng-types.h>
 #include <linux/debugfs.h>
-#include <linux/ringbuffer/frontend_types.h>
+#include "../wrapper/vmalloc.h"        /* for wrapper_vmalloc_sync_all() */
+#include "../wrapper/ringbuffer/frontend_types.h"
 #include "../ltt-events.h"
 #include "../ltt-tracer-core.h"
 
@@ -52,6 +53,28 @@ struct lttng_event_desc {
        TRACE_EVENT(name, PARAMS(proto), PARAMS(args),                  \
                PARAMS(tstruct), PARAMS(assign), PARAMS(print))         \
 
+/*
+ * Stage 0.1 of the trace events.
+ *
+ * Create dummy trace calls for each events, verifying that the LTTng module
+ * TRACE_EVENT headers match the kernel arguments. Will be optimized out by the
+ * compiler.
+ */
+
+#include "lttng-events-reset.h"        /* Reset all macros within TRACE_EVENT */
+
+#undef TP_PROTO
+#define TP_PROTO(args...) args
+
+#undef TP_ARGS
+#define TP_ARGS(args...) args
+
+#undef DEFINE_EVENT
+#define DEFINE_EVENT(_template, _name, _proto, _args)                  \
+void trace_##_name(_proto);
+
+#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
+
 /*
  * Stage 1 of the trace events.
  *
@@ -572,6 +595,7 @@ static int TP_ID(__lttng_events_init__, TRACE_SYSTEM)(void)
        int ret;
        int i;
 
+       wrapper_vmalloc_sync_all();
        ret = TP_ID(__lttng_types_init__, TRACE_SYSTEM)();
        if (ret)
                return ret;
This page took 0.023447 seconds and 4 git commands to generate.