Commit | Line | Data |
---|---|---|
e09a6084 WF |
1 | #undef TRACE_SYSTEM |
2 | #define TRACE_SYSTEM v4l2 | |
3 | ||
3bc29f0a MD |
4 | #if !defined(LTTNG_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) |
5 | #define LTTNG_TRACE_V4L2_H | |
e09a6084 | 6 | |
6ec43db8 | 7 | #include <probes/lttng-tracepoint-event.h> |
e09a6084 | 8 | |
fbae04ba MJ |
9 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) |
10 | LTTNG_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 | |
f127e61e MD |
35 | LTTNG_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 | ) | |
fbae04ba | 59 | #endif |
e09a6084 | 60 | |
f127e61e MD |
61 | LTTNG_TRACEPOINT_EVENT_INSTANCE(v4l2_class, |
62 | v4l2_dqbuf, | |
e09a6084 | 63 | |
f127e61e | 64 | TP_PROTO(int minor, struct v4l2_buffer *buf), |
e09a6084 | 65 | |
f127e61e MD |
66 | TP_ARGS(minor, buf) |
67 | ) | |
e09a6084 | 68 | |
f127e61e MD |
69 | LTTNG_TRACEPOINT_EVENT_INSTANCE(v4l2_class, |
70 | ||
71 | v4l2_qbuf, | |
72 | ||
73 | TP_PROTO(int minor, struct v4l2_buffer *buf), | |
e09a6084 | 74 | |
f127e61e MD |
75 | TP_ARGS(minor, buf) |
76 | ) | |
e09a6084 | 77 | |
3bc29f0a | 78 | #endif /* if !defined(LTTNG_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) */ |
e09a6084 WF |
79 | |
80 | /* This part must be outside protection */ | |
6ec43db8 | 81 | #include <probes/define_trace.h> |