1 #undef TRACE_SYSTEM 2 #define TRACE_SYSTEM vb2 3 4 #if !defined(_TRACE_VB2_H) || defined(TRACE_HEADER_MULTI_READ) 5 #define _TRACE_VB2_H 6 7 #include <linux/tracepoint.h> 8 #include <media/videobuf2-core.h> 9 10 DECLARE_EVENT_CLASS(vb2_event_class, 11 TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb), 12 TP_ARGS(q, vb), 13 14 TP_STRUCT__entry( 15 __field(void *, owner) 16 __field(u32, queued_count) 17 __field(int, owned_by_drv_count) 18 __field(u32, index) 19 __field(u32, type) 20 __field(u32, bytesused) 21 ), 22 23 TP_fast_assign( 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; 31 ), 32 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, 38 __entry->bytesused 39 ) 40 ) 41 42 DEFINE_EVENT(vb2_event_class, vb2_buf_done, 43 TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb), 44 TP_ARGS(q, vb) 45 ); 46 47 DEFINE_EVENT(vb2_event_class, vb2_buf_queue, 48 TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb), 49 TP_ARGS(q, vb) 50 ); 51 52 DEFINE_EVENT(vb2_event_class, vb2_dqbuf, 53 TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb), 54 TP_ARGS(q, vb) 55 ); 56 57 DEFINE_EVENT(vb2_event_class, vb2_qbuf, 58 TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb), 59 TP_ARGS(q, vb) 60 ); 61 62 #endif /* if !defined(_TRACE_VB2_H) || defined(TRACE_HEADER_MULTI_READ) */ 63 64 /* This part must be outside protection */ 65 #include <trace/define_trace.h> 66