Fix: remove regmap instrumentation for kernels < 4.1
[lttng-modules.git] / instrumentation / events / lttng-module / v4l2.h
index edc57c8656519befb83b055117ce229376970547..94615657c16d73a9e7f8369a4f1c3088bdf6164f 100644 (file)
@@ -1,23 +1,10 @@
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM v4l2
 
-#if !defined(_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ)
-#define _TRACE_V4L2_H
+#if !defined(LTTNG_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ)
+#define LTTNG_TRACE_V4L2_H
 
-#include <linux/tracepoint.h>
-
-#define show_field(field)                                              \
-       __print_symbolic(field,                                         \
-               { V4L2_FIELD_ANY,               "ANY" },                \
-               { V4L2_FIELD_NONE,              "NONE" },               \
-               { V4L2_FIELD_TOP,               "TOP" },                \
-               { V4L2_FIELD_BOTTOM,            "BOTTOM" },             \
-               { V4L2_FIELD_INTERLACED,        "INTERLACED" },         \
-               { V4L2_FIELD_SEQ_TB,            "SEQ_TB" },             \
-               { V4L2_FIELD_SEQ_BT,            "SEQ_BT" },             \
-               { V4L2_FIELD_ALTERNATE,         "ALTERNATE" },          \
-               { V4L2_FIELD_INTERLACED_TB,     "INTERLACED_TB" },      \
-               { V4L2_FIELD_INTERLACED_BT,     "INTERLACED_BT" })
+#include "../../../probes/lttng-tracepoint-event.h"
 
 #define show_timecode_type(type)                                       \
        __print_symbolic(type,                                          \
@@ -52,8 +39,8 @@
                { V4L2_TC_USERBITS_USERDEFINED, "USERBITS_USERDEFINED" }, \
                { V4L2_TC_USERBITS_8BITCHARS,   "USERBITS_8BITCHARS" })
 
-#define LTTNG_V4L2_TRACE_EVENT(event_name)                             \
-       TRACE_EVENT(event_name,                                         \
+#define LTTNG_TRACEPOINT_EVENT_V4L2(event_name)                                \
+       LTTNG_TRACEPOINT_EVENT(event_name,                                              \
                TP_PROTO(int minor, struct v4l2_buffer *buf),           \
                                                                        \
                TP_ARGS(minor, buf),                                    \
                        tp_assign(sequence, buf->sequence);             \
                ),                                                      \
                                                                        \
-               TP_printk("minor = %d, index = %u, type = %s, "         \
-                         "bytesused = %u, flags = %s, "                \
-                         "field = %s, timestamp = %llu, timecode = { " \
-                         "type = %s, flags = %s, frames = %u, "        \
-                         "seconds = %u, minutes = %u, hours = %u, "    \
-                         "userbits = { %u %u %u %u } }, "              \
-                         "sequence = %u", __entry->minor,              \
-                         __entry->index, show_type(__entry->type),     \
-                         __entry->bytesused,                           \
-                         show_flags(__entry->flags),                   \
-                         show_field(__entry->field),                   \
-                         __entry->timestamp,                           \
-                         show_timecode_type(__entry->timecode_type),   \
-                         show_timecode_flags(__entry->timecode_flags), \
-                         __entry->timecode_frames,                     \
-                         __entry->timecode_seconds,                    \
-                         __entry->timecode_minutes,                    \
-                         __entry->timecode_hours,                      \
-                         __entry->timecode_userbits0,                  \
-                         __entry->timecode_userbits1,                  \
-                         __entry->timecode_userbits2,                  \
-                         __entry->timecode_userbits3,                  \
-                         __entry->sequence                             \
-               )                                                       \
+               TP_printk()                                             \
        )
 
-LTTNG_V4L2_TRACE_EVENT(v4l2_dqbuf)
-LTTNG_V4L2_TRACE_EVENT(v4l2_qbuf)
+LTTNG_TRACEPOINT_EVENT_V4L2(v4l2_dqbuf)
+LTTNG_TRACEPOINT_EVENT_V4L2(v4l2_qbuf)
 
-#endif /* if !defined(_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) */
+#endif /* if !defined(LTTNG_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) */
 
 /* This part must be outside protection */
 #include "../../../probes/define_trace.h"
This page took 0.033187 seconds and 4 git commands to generate.