2 #define TRACE_SYSTEM fence
4 #if !defined(_TRACE_FENCE_H) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/tracepoint.h>
11 TRACE_EVENT(fence_annotate_wait_on
,
13 /* fence: the fence waiting on f1, f1: the fence to be waited on. */
14 TP_PROTO(struct fence
*fence
, struct fence
*f1
),
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
)
24 __string(waiting_driver
, f1
->ops
->get_driver_name(f1
))
25 __string(waiting_timeline
, f1
->ops
->get_timeline_name(f1
))
26 __field(unsigned int, waiting_context
)
27 __field(unsigned int, waiting_seqno
)
31 __assign_str(driver
, fence
->ops
->get_driver_name(fence
))
32 __assign_str(timeline
, fence
->ops
->get_timeline_name(fence
))
33 __entry
->context
= fence
->context
;
34 __entry
->seqno
= fence
->seqno
;
36 __assign_str(waiting_driver
, f1
->ops
->get_driver_name(f1
))
37 __assign_str(waiting_timeline
, f1
->ops
->get_timeline_name(f1
))
38 __entry
->waiting_context
= f1
->context
;
39 __entry
->waiting_seqno
= f1
->seqno
;
43 TP_printk("driver=%s timeline=%s context=%u seqno=%u " \
44 "waits on driver=%s timeline=%s context=%u seqno=%u",
45 __get_str(driver
), __get_str(timeline
), __entry
->context
,
47 __get_str(waiting_driver
), __get_str(waiting_timeline
),
48 __entry
->waiting_context
, __entry
->waiting_seqno
)
51 DECLARE_EVENT_CLASS(fence
,
53 TP_PROTO(struct fence
*fence
),
58 __string(driver
, fence
->ops
->get_driver_name(fence
))
59 __string(timeline
, fence
->ops
->get_timeline_name(fence
))
60 __field(unsigned int, context
)
61 __field(unsigned int, seqno
)
65 __assign_str(driver
, fence
->ops
->get_driver_name(fence
))
66 __assign_str(timeline
, fence
->ops
->get_timeline_name(fence
))
67 __entry
->context
= fence
->context
;
68 __entry
->seqno
= fence
->seqno
;
71 TP_printk("driver=%s timeline=%s context=%u seqno=%u",
72 __get_str(driver
), __get_str(timeline
), __entry
->context
,
76 DEFINE_EVENT(fence
, fence_emit
,
78 TP_PROTO(struct fence
*fence
),
83 DEFINE_EVENT(fence
, fence_init
,
85 TP_PROTO(struct fence
*fence
),
90 DEFINE_EVENT(fence
, fence_destroy
,
92 TP_PROTO(struct fence
*fence
),
97 DEFINE_EVENT(fence
, fence_enable_signal
,
99 TP_PROTO(struct fence
*fence
),
104 DEFINE_EVENT(fence
, fence_signaled
,
106 TP_PROTO(struct fence
*fence
),
111 DEFINE_EVENT(fence
, fence_wait_start
,
113 TP_PROTO(struct fence
*fence
),
118 DEFINE_EVENT(fence
, fence_wait_end
,
120 TP_PROTO(struct fence
*fence
),
125 #endif /* _TRACE_FENCE_H */
127 /* This part must be outside protection */
128 #include <trace/define_trace.h>