Commit | Line | Data |
---|---|---|
9f36eaed | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
e09a6084 WF |
2 | #undef TRACE_SYSTEM |
3 | #define TRACE_SYSTEM v4l2 | |
4 | ||
3bc29f0a MD |
5 | #if !defined(LTTNG_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) |
6 | #define LTTNG_TRACE_V4L2_H | |
e09a6084 | 7 | |
6ec43db8 | 8 | #include <probes/lttng-tracepoint-event.h> |
e09a6084 | 9 | |
f127e61e MD |
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, timeval_to_ns(&buf->timestamp)) | |
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 | ) | |
e09a6084 | 34 | |
f127e61e MD |
35 | LTTNG_TRACEPOINT_EVENT_INSTANCE(v4l2_class, |
36 | v4l2_dqbuf, | |
e09a6084 | 37 | |
f127e61e | 38 | TP_PROTO(int minor, struct v4l2_buffer *buf), |
e09a6084 | 39 | |
f127e61e MD |
40 | TP_ARGS(minor, buf) |
41 | ) | |
e09a6084 | 42 | |
f127e61e MD |
43 | LTTNG_TRACEPOINT_EVENT_INSTANCE(v4l2_class, |
44 | ||
45 | v4l2_qbuf, | |
46 | ||
47 | TP_PROTO(int minor, struct v4l2_buffer *buf), | |
e09a6084 | 48 | |
f127e61e MD |
49 | TP_ARGS(minor, buf) |
50 | ) | |
e09a6084 | 51 | |
3bc29f0a | 52 | #endif /* if !defined(LTTNG_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) */ |
e09a6084 WF |
53 | |
54 | /* This part must be outside protection */ | |
6ec43db8 | 55 | #include <probes/define_trace.h> |