xref: /openbmc/linux/include/trace/events/dma_fence.h (revision 7a010c3c)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM dma_fence
4 
5 #if !defined(_TRACE_DMA_FENCE_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_DMA_FENCE_H
7 
8 #include <linux/tracepoint.h>
9 
10 struct dma_fence;
11 
12 DECLARE_EVENT_CLASS(dma_fence,
13 
14 	TP_PROTO(struct dma_fence *fence),
15 
16 	TP_ARGS(fence),
17 
18 	TP_STRUCT__entry(
19 		__string(driver, fence->ops->get_driver_name(fence))
20 		__string(timeline, fence->ops->get_timeline_name(fence))
21 		__field(unsigned int, context)
22 		__field(unsigned int, seqno)
23 	),
24 
25 	TP_fast_assign(
26 		__assign_str(driver, fence->ops->get_driver_name(fence));
27 		__assign_str(timeline, fence->ops->get_timeline_name(fence));
28 		__entry->context = fence->context;
29 		__entry->seqno = fence->seqno;
30 	),
31 
32 	TP_printk("driver=%s timeline=%s context=%u seqno=%u",
33 		  __get_str(driver), __get_str(timeline), __entry->context,
34 		  __entry->seqno)
35 );
36 
37 DEFINE_EVENT(dma_fence, dma_fence_emit,
38 
39 	TP_PROTO(struct dma_fence *fence),
40 
41 	TP_ARGS(fence)
42 );
43 
44 DEFINE_EVENT(dma_fence, dma_fence_init,
45 
46 	TP_PROTO(struct dma_fence *fence),
47 
48 	TP_ARGS(fence)
49 );
50 
51 DEFINE_EVENT(dma_fence, dma_fence_destroy,
52 
53 	TP_PROTO(struct dma_fence *fence),
54 
55 	TP_ARGS(fence)
56 );
57 
58 DEFINE_EVENT(dma_fence, dma_fence_enable_signal,
59 
60 	TP_PROTO(struct dma_fence *fence),
61 
62 	TP_ARGS(fence)
63 );
64 
65 DEFINE_EVENT(dma_fence, dma_fence_signaled,
66 
67 	TP_PROTO(struct dma_fence *fence),
68 
69 	TP_ARGS(fence)
70 );
71 
72 DEFINE_EVENT(dma_fence, dma_fence_wait_start,
73 
74 	TP_PROTO(struct dma_fence *fence),
75 
76 	TP_ARGS(fence)
77 );
78 
79 DEFINE_EVENT(dma_fence, dma_fence_wait_end,
80 
81 	TP_PROTO(struct dma_fence *fence),
82 
83 	TP_ARGS(fence)
84 );
85 
86 #endif /*  _TRACE_DMA_FENCE_H */
87 
88 /* This part must be outside protection */
89 #include <trace/define_trace.h>
90