1#undef TRACE_SYSTEM 2#define TRACE_SYSTEM coda 3 4#if !defined(__CODA_TRACE_H__) || defined(TRACE_HEADER_MULTI_READ) 5#define __CODA_TRACE_H__ 6 7#include <linux/tracepoint.h> 8#include <media/videobuf2-v4l2.h> 9 10#include "coda.h" 11 12TRACE_EVENT(coda_bit_run, 13 TP_PROTO(struct coda_ctx *ctx, int cmd), 14 15 TP_ARGS(ctx, cmd), 16 17 TP_STRUCT__entry( 18 __field(int, minor) 19 __field(int, ctx) 20 __field(int, cmd) 21 ), 22 23 TP_fast_assign( 24 __entry->minor = ctx->fh.vdev->minor; 25 __entry->ctx = ctx->idx; 26 __entry->cmd = cmd; 27 ), 28 29 TP_printk("minor = %d, ctx = %d, cmd = %d", 30 __entry->minor, __entry->ctx, __entry->cmd) 31); 32 33TRACE_EVENT(coda_bit_done, 34 TP_PROTO(struct coda_ctx *ctx), 35 36 TP_ARGS(ctx), 37 38 TP_STRUCT__entry( 39 __field(int, minor) 40 __field(int, ctx) 41 ), 42 43 TP_fast_assign( 44 __entry->minor = ctx->fh.vdev->minor; 45 __entry->ctx = ctx->idx; 46 ), 47 48 TP_printk("minor = %d, ctx = %d", __entry->minor, __entry->ctx) 49); 50 51DECLARE_EVENT_CLASS(coda_buf_class, 52 TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf), 53 54 TP_ARGS(ctx, buf), 55 56 TP_STRUCT__entry( 57 __field(int, minor) 58 __field(int, index) 59 __field(int, ctx) 60 ), 61 62 TP_fast_assign( 63 __entry->minor = ctx->fh.vdev->minor; 64 __entry->index = buf->vb2_buf.index; 65 __entry->ctx = ctx->idx; 66 ), 67 68 TP_printk("minor = %d, index = %d, ctx = %d", 69 __entry->minor, __entry->index, __entry->ctx) 70); 71 72DEFINE_EVENT(coda_buf_class, coda_enc_pic_run, 73 TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf), 74 TP_ARGS(ctx, buf) 75); 76 77DEFINE_EVENT(coda_buf_class, coda_enc_pic_done, 78 TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf), 79 TP_ARGS(ctx, buf) 80); 81 82DECLARE_EVENT_CLASS(coda_buf_meta_class, 83 TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, 84 struct coda_buffer_meta *meta), 85 86 TP_ARGS(ctx, buf, meta), 87 88 TP_STRUCT__entry( 89 __field(int, minor) 90 __field(int, index) 91 __field(int, start) 92 __field(int, end) 93 __field(int, ctx) 94 ), 95 96 TP_fast_assign( 97 __entry->minor = ctx->fh.vdev->minor; 98 __entry->index = buf->vb2_buf.index; 99 __entry->start = meta->start; 100 __entry->end = meta->end; 101 __entry->ctx = ctx->idx; 102 ), 103 104 TP_printk("minor = %d, index = %d, start = 0x%x, end = 0x%x, ctx = %d", 105 __entry->minor, __entry->index, __entry->start, __entry->end, 106 __entry->ctx) 107); 108 109DEFINE_EVENT(coda_buf_meta_class, coda_bit_queue, 110 TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, 111 struct coda_buffer_meta *meta), 112 TP_ARGS(ctx, buf, meta) 113); 114 115DECLARE_EVENT_CLASS(coda_meta_class, 116 TP_PROTO(struct coda_ctx *ctx, struct coda_buffer_meta *meta), 117 118 TP_ARGS(ctx, meta), 119 120 TP_STRUCT__entry( 121 __field(int, minor) 122 __field(int, start) 123 __field(int, end) 124 __field(int, ctx) 125 ), 126 127 TP_fast_assign( 128 __entry->minor = ctx->fh.vdev->minor; 129 __entry->start = meta ? meta->start : 0; 130 __entry->end = meta ? meta->end : 0; 131 __entry->ctx = ctx->idx; 132 ), 133 134 TP_printk("minor = %d, start = 0x%x, end = 0x%x, ctx = %d", 135 __entry->minor, __entry->start, __entry->end, __entry->ctx) 136); 137 138DEFINE_EVENT(coda_meta_class, coda_dec_pic_run, 139 TP_PROTO(struct coda_ctx *ctx, struct coda_buffer_meta *meta), 140 TP_ARGS(ctx, meta) 141); 142 143DEFINE_EVENT(coda_meta_class, coda_dec_pic_done, 144 TP_PROTO(struct coda_ctx *ctx, struct coda_buffer_meta *meta), 145 TP_ARGS(ctx, meta) 146); 147 148DEFINE_EVENT(coda_buf_meta_class, coda_dec_rot_done, 149 TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, 150 struct coda_buffer_meta *meta), 151 TP_ARGS(ctx, buf, meta) 152); 153 154#endif /* __CODA_TRACE_H__ */ 155 156#undef TRACE_INCLUDE_PATH 157#define TRACE_INCLUDE_PATH . 158#undef TRACE_INCLUDE_FILE 159#define TRACE_INCLUDE_FILE trace 160 161/* This part must be outside protection */ 162#include <trace/define_trace.h> 163