Rename LTTng instrumentation macros
[lttng-modules.git] / instrumentation / events / lttng-module / lttng.h
index 6f3d6d1412154bde10c2f3ec7e2c666e92c13992..cd766d29496ccd639706d879d55f98c59745c44f 100644 (file)
@@ -1,34 +1,24 @@
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM lttng
 
-#if !defined(_TRACE_LTTNG_H) || defined(TRACE_HEADER_MULTI_READ)
-#define _TRACE_LTTNG_H
+#if !defined(LTTNG_TRACE_LTTNG_H) || defined(TRACE_HEADER_MULTI_READ)
+#define LTTNG_TRACE_LTTNG_H
 
-#include <linux/tracepoint.h>
+#include "../../../probes/lttng-tracepoint-event.h"
 
-TRACE_EVENT(lttng_metadata,
-
-       TP_PROTO(const char *str),
-
-       TP_ARGS(str),
-
-       /*
-        * Not exactly a string: more a sequence of bytes (dynamic
-        * array) without the length. This is a dummy anyway: we only
-        * use this declaration to generate an event metadata entry.
-        */
+LTTNG_TRACEPOINT_EVENT(lttng_logger,
+       TP_PROTO(const char __user *text, size_t len),
+       TP_ARGS(text, len),
        TP_STRUCT__entry(
-               __string(       str,            str     )
+               __dynamic_array_text(char, msg, len)
        ),
-
        TP_fast_assign(
-               tp_strcpy(str, str)
+               tp_memcpy_dyn_from_user(msg, text)
        ),
-
        TP_printk("")
 )
 
-#endif /*  _TRACE_LTTNG_H */
+#endif /* LTTNG_TRACE_LTTNG_H */
 
 /* This part must be outside protection */
 #include "../../../probes/define_trace.h"
This page took 0.037778 seconds and 4 git commands to generate.