dma_fence.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #undef TRACE_SYSTEM
  3. #define TRACE_SYSTEM dma_fence
  4. #if !defined(_TRACE_FENCE_H) || defined(TRACE_HEADER_MULTI_READ)
  5. #define _TRACE_DMA_FENCE_H
  6. #include <linux/tracepoint.h>
  7. struct dma_fence;
  8. DECLARE_EVENT_CLASS(dma_fence,
  9. TP_PROTO(struct dma_fence *fence),
  10. TP_ARGS(fence),
  11. TP_STRUCT__entry(
  12. __string(driver, fence->ops->get_driver_name(fence))
  13. __string(timeline, fence->ops->get_timeline_name(fence))
  14. __field(unsigned int, context)
  15. __field(unsigned int, seqno)
  16. ),
  17. TP_fast_assign(
  18. __assign_str(driver, fence->ops->get_driver_name(fence))
  19. __assign_str(timeline, fence->ops->get_timeline_name(fence))
  20. __entry->context = fence->context;
  21. __entry->seqno = fence->seqno;
  22. ),
  23. TP_printk("driver=%s timeline=%s context=%u seqno=%u",
  24. __get_str(driver), __get_str(timeline), __entry->context,
  25. __entry->seqno)
  26. );
  27. DEFINE_EVENT(dma_fence, dma_fence_emit,
  28. TP_PROTO(struct dma_fence *fence),
  29. TP_ARGS(fence)
  30. );
  31. DEFINE_EVENT(dma_fence, dma_fence_init,
  32. TP_PROTO(struct dma_fence *fence),
  33. TP_ARGS(fence)
  34. );
  35. DEFINE_EVENT(dma_fence, dma_fence_destroy,
  36. TP_PROTO(struct dma_fence *fence),
  37. TP_ARGS(fence)
  38. );
  39. DEFINE_EVENT(dma_fence, dma_fence_enable_signal,
  40. TP_PROTO(struct dma_fence *fence),
  41. TP_ARGS(fence)
  42. );
  43. DEFINE_EVENT(dma_fence, dma_fence_signaled,
  44. TP_PROTO(struct dma_fence *fence),
  45. TP_ARGS(fence)
  46. );
  47. DEFINE_EVENT(dma_fence, dma_fence_wait_start,
  48. TP_PROTO(struct dma_fence *fence),
  49. TP_ARGS(fence)
  50. );
  51. DEFINE_EVENT(dma_fence, dma_fence_wait_end,
  52. TP_PROTO(struct dma_fence *fence),
  53. TP_ARGS(fence)
  54. );
  55. #endif /* _TRACE_DMA_FENCE_H */
  56. /* This part must be outside protection */
  57. #include <trace/define_trace.h>