trace.h 4.2 KB

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