Commit | Line | Data |
---|---|---|
9a1a8f99 PZ |
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> | |
c139990e | 8 | #include <media/videobuf2-v4l2.h> |
9a1a8f99 PZ |
9 | |
10 | #include "coda.h" | |
11 | ||
9a1a8f99 PZ |
12 | TRACE_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 | ||
33 | TRACE_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 | ||
f0710815 | 51 | DECLARE_EVENT_CLASS(coda_buf_class, |
2d700715 | 52 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf), |
9a1a8f99 PZ |
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; | |
2d700715 | 64 | __entry->index = buf->vb2_buf.index; |
9a1a8f99 PZ |
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 | ||
f0710815 | 72 | DEFINE_EVENT(coda_buf_class, coda_enc_pic_run, |
2d700715 | 73 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf), |
f0710815 PZ |
74 | TP_ARGS(ctx, buf) |
75 | ); | |
9a1a8f99 | 76 | |
f0710815 | 77 | DEFINE_EVENT(coda_buf_class, coda_enc_pic_done, |
2d700715 | 78 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf), |
f0710815 | 79 | TP_ARGS(ctx, buf) |
9a1a8f99 PZ |
80 | ); |
81 | ||
f0710815 | 82 | DECLARE_EVENT_CLASS(coda_buf_meta_class, |
2d700715 | 83 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, |
9a1a8f99 PZ |
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; | |
2d700715 | 98 | __entry->index = buf->vb2_buf.index; |
9a1a8f99 PZ |
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 | ||
f0710815 | 109 | DEFINE_EVENT(coda_buf_meta_class, coda_bit_queue, |
2d700715 | 110 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, |
f0710815 PZ |
111 | struct coda_buffer_meta *meta), |
112 | TP_ARGS(ctx, buf, meta) | |
113 | ); | |
114 | ||
115 | DECLARE_EVENT_CLASS(coda_meta_class, | |
9a1a8f99 PZ |
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 | ||
f0710815 | 138 | DEFINE_EVENT(coda_meta_class, coda_dec_pic_run, |
9a1a8f99 | 139 | TP_PROTO(struct coda_ctx *ctx, struct coda_buffer_meta *meta), |
f0710815 | 140 | TP_ARGS(ctx, meta) |
9a1a8f99 PZ |
141 | ); |
142 | ||
f0710815 PZ |
143 | DEFINE_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 | ); | |
9a1a8f99 | 147 | |
f0710815 | 148 | DEFINE_EVENT(coda_buf_meta_class, coda_dec_rot_done, |
2d700715 | 149 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, |
f0710815 PZ |
150 | struct coda_buffer_meta *meta), |
151 | TP_ARGS(ctx, buf, meta) | |
9a1a8f99 PZ |
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> |