Namespace kernel version macros
[lttng-modules.git] / instrumentation / events / lttng-module / v4l2.h
... / ...
CommitLineData
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM v4l2
3
4#if !defined(LTTNG_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ)
5#define LTTNG_TRACE_V4L2_H
6
7#include <probes/lttng-tracepoint-event.h>
8
9#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
10LTTNG_TRACEPOINT_EVENT_CLASS(v4l2_class,
11
12 TP_PROTO(int minor, struct v4l2_buffer *buf),
13
14 TP_ARGS(minor, buf),
15
16 TP_FIELDS(
17 ctf_integer(int, minor, minor)
18 ctf_integer(u32, index, buf->index)
19 ctf_integer(u32, type, buf->type)
20 ctf_integer(u32, bytesused, buf->bytesused)
21 ctf_integer(u32, flags, buf->flags)
22 ctf_integer(u32, field, buf->field)
23 ctf_integer(s64, timestamp, v4l2_buffer_get_timestamp(buf))
24 ctf_integer(u32, timecode_type, buf->timecode.type)
25 ctf_integer(u32, timecode_flags, buf->timecode.flags)
26 ctf_integer(u8, timecode_frames, buf->timecode.frames)
27 ctf_integer(u8, timecode_seconds, buf->timecode.seconds)
28 ctf_integer(u8, timecode_minutes, buf->timecode.minutes)
29 ctf_integer(u8, timecode_hours, buf->timecode.hours)
30 ctf_array(u8, timecode_userbits, buf->timecode.userbits, 4)
31 ctf_integer(u32, sequence, buf->sequence)
32 )
33)
34#else
35LTTNG_TRACEPOINT_EVENT_CLASS(v4l2_class,
36
37 TP_PROTO(int minor, struct v4l2_buffer *buf),
38
39 TP_ARGS(minor, buf),
40
41 TP_FIELDS(
42 ctf_integer(int, minor, minor)
43 ctf_integer(u32, index, buf->index)
44 ctf_integer(u32, type, buf->type)
45 ctf_integer(u32, bytesused, buf->bytesused)
46 ctf_integer(u32, flags, buf->flags)
47 ctf_integer(u32, field, buf->field)
48 ctf_integer(s64, timestamp, timeval_to_ns(&buf->timestamp))
49 ctf_integer(u32, timecode_type, buf->timecode.type)
50 ctf_integer(u32, timecode_flags, buf->timecode.flags)
51 ctf_integer(u8, timecode_frames, buf->timecode.frames)
52 ctf_integer(u8, timecode_seconds, buf->timecode.seconds)
53 ctf_integer(u8, timecode_minutes, buf->timecode.minutes)
54 ctf_integer(u8, timecode_hours, buf->timecode.hours)
55 ctf_array(u8, timecode_userbits, buf->timecode.userbits, 4)
56 ctf_integer(u32, sequence, buf->sequence)
57 )
58)
59#endif
60
61LTTNG_TRACEPOINT_EVENT_INSTANCE(v4l2_class,
62 v4l2_dqbuf,
63
64 TP_PROTO(int minor, struct v4l2_buffer *buf),
65
66 TP_ARGS(minor, buf)
67)
68
69LTTNG_TRACEPOINT_EVENT_INSTANCE(v4l2_class,
70
71 v4l2_qbuf,
72
73 TP_PROTO(int minor, struct v4l2_buffer *buf),
74
75 TP_ARGS(minor, buf)
76)
77
78#endif /* if !defined(LTTNG_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) */
79
80/* This part must be outside protection */
81#include <probes/define_trace.h>
This page took 0.023164 seconds and 4 git commands to generate.