2 #define TRACE_SYSTEM vb2
4 #if !defined(_TRACE_VB2_H) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/tracepoint.h>
8 #include <media/videobuf2-core.h>
10 DECLARE_EVENT_CLASS(vb2_event_class
,
11 TP_PROTO(struct vb2_queue
*q
, struct vb2_buffer
*vb
),
15 __field(void *, owner
)
16 __field(u32
, queued_count
)
17 __field(int, owned_by_drv_count
)
20 __field(u32
, bytesused
)
21 __field(u64
, timestamp
)
25 __entry
->owner
= q
->owner
;
26 __entry
->queued_count
= q
->queued_count
;
27 __entry
->owned_by_drv_count
=
28 atomic_read(&q
->owned_by_drv_count
);
29 __entry
->index
= vb
->index
;
30 __entry
->type
= vb
->type
;
31 __entry
->bytesused
= vb
->planes
[0].bytesused
;
32 __entry
->timestamp
= vb
->timestamp
;
35 TP_printk("owner = %p, queued = %u, owned_by_drv = %d, index = %u, "
36 "type = %u, bytesused = %u, timestamp = %llu", __entry
->owner
,
37 __entry
->queued_count
,
38 __entry
->owned_by_drv_count
,
39 __entry
->index
, __entry
->type
,
45 DEFINE_EVENT(vb2_event_class
, vb2_buf_done
,
46 TP_PROTO(struct vb2_queue
*q
, struct vb2_buffer
*vb
),
50 DEFINE_EVENT(vb2_event_class
, vb2_buf_queue
,
51 TP_PROTO(struct vb2_queue
*q
, struct vb2_buffer
*vb
),
55 DEFINE_EVENT(vb2_event_class
, vb2_dqbuf
,
56 TP_PROTO(struct vb2_queue
*q
, struct vb2_buffer
*vb
),
60 DEFINE_EVENT(vb2_event_class
, vb2_qbuf
,
61 TP_PROTO(struct vb2_queue
*q
, struct vb2_buffer
*vb
),
65 #endif /* if !defined(_TRACE_VB2_H) || defined(TRACE_HEADER_MULTI_READ) */
67 /* This part must be outside protection */
68 #include <trace/define_trace.h>