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)
24 __entry->owner = q->owner;
25 __entry->queued_count = q->queued_count;
26 __entry->owned_by_drv_count =
27 atomic_read(&q->owned_by_drv_count);
28 __entry->index = vb->index;
29 __entry->type = vb->type;
30 __entry->bytesused = vb->planes[0].bytesused;
33 TP_printk("owner = %p, queued = %u, owned_by_drv = %d, index = %u, "
34 "type = %u, bytesused = %u", __entry->owner,
35 __entry->queued_count,
36 __entry->owned_by_drv_count,
37 __entry->index, __entry->type,
42 DEFINE_EVENT(vb2_event_class, vb2_buf_done,
43 TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
47 DEFINE_EVENT(vb2_event_class, vb2_buf_queue,
48 TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
52 DEFINE_EVENT(vb2_event_class, vb2_dqbuf,
53 TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
57 DEFINE_EVENT(vb2_event_class, vb2_qbuf,
58 TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
62 #endif /* if !defined(_TRACE_VB2_H) || defined(TRACE_HEADER_MULTI_READ) */
64 /* This part must be outside protection */
65 #include <trace/define_trace.h>