1#undef TRACE_SYSTEM 2#define TRACE_SYSTEM fence 3 4#if !defined(_TRACE_FENCE_H) || defined(TRACE_HEADER_MULTI_READ) 5#define _TRACE_FENCE_H 6 7#include <linux/tracepoint.h> 8 9struct fence; 10 11TRACE_EVENT(fence_annotate_wait_on, 12 13 /* fence: the fence waiting on f1, f1: the fence to be waited on. */ 14 TP_PROTO(struct fence *fence, struct fence *f1), 15 16 TP_ARGS(fence, f1), 17 18 TP_STRUCT__entry( 19 __string(driver, fence->ops->get_driver_name(fence)) 20 __string(timeline, fence->ops->get_driver_name(fence)) 21 __field(unsigned int, context) 22 __field(unsigned int, seqno) 23 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) 28 ), 29 30 TP_fast_assign( 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; 35 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; 40 41 ), 42 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, 46 __entry->seqno, 47 __get_str(waiting_driver), __get_str(waiting_timeline), 48 __entry->waiting_context, __entry->waiting_seqno) 49); 50 51DECLARE_EVENT_CLASS(fence, 52 53 TP_PROTO(struct fence *fence), 54 55 TP_ARGS(fence), 56 57 TP_STRUCT__entry( 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) 62 ), 63 64 TP_fast_assign( 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; 69 ), 70 71 TP_printk("driver=%s timeline=%s context=%u seqno=%u", 72 __get_str(driver), __get_str(timeline), __entry->context, 73 __entry->seqno) 74); 75 76DEFINE_EVENT(fence, fence_emit, 77 78 TP_PROTO(struct fence *fence), 79 80 TP_ARGS(fence) 81); 82 83DEFINE_EVENT(fence, fence_init, 84 85 TP_PROTO(struct fence *fence), 86 87 TP_ARGS(fence) 88); 89 90DEFINE_EVENT(fence, fence_destroy, 91 92 TP_PROTO(struct fence *fence), 93 94 TP_ARGS(fence) 95); 96 97DEFINE_EVENT(fence, fence_enable_signal, 98 99 TP_PROTO(struct fence *fence), 100 101 TP_ARGS(fence) 102); 103 104DEFINE_EVENT(fence, fence_signaled, 105 106 TP_PROTO(struct fence *fence), 107 108 TP_ARGS(fence) 109); 110 111DEFINE_EVENT(fence, fence_wait_start, 112 113 TP_PROTO(struct fence *fence), 114 115 TP_ARGS(fence) 116); 117 118DEFINE_EVENT(fence, fence_wait_end, 119 120 TP_PROTO(struct fence *fence), 121 122 TP_ARGS(fence) 123); 124 125#endif /* _TRACE_FENCE_H */ 126 127/* This part must be outside protection */ 128#include <trace/define_trace.h> 129