• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM sync
3 
4 #if !defined(_TRACE_SYNC_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_SYNC_H
6 
7 #include <linux/sync.h>
8 #include <linux/tracepoint.h>
9 
10 TRACE_EVENT(sync_timeline,
11 	    TP_PROTO(struct sync_timeline *timeline),
12 
13 	    TP_ARGS(timeline),
14 
15 	    TP_STRUCT__entry(
16 		    __string(name, timeline->name)
17 		    __array(char, value, 32)
18 		    ),
19 
20 	    TP_fast_assign(
21 		    __assign_str(name, timeline->name);
22 		    if (timeline->ops->timeline_value_str) {
23 			    timeline->ops->timeline_value_str(timeline,
24 							      __entry->value,
25 							      sizeof(__entry->value));
26 		    } else {
27 			    __entry->value[0] = '\0';
28 		    }
29 		    ),
30 
31 	    TP_printk("name=%s value=%s", __get_str(name), __entry->value)
32 );
33 
34 TRACE_EVENT(sync_wait,
35 	    TP_PROTO(struct sync_fence *fence, int begin),
36 
37 	    TP_ARGS(fence, begin),
38 
39 	    TP_STRUCT__entry(
40 		    __string(name, fence->name)
41 		    __field(s32, status)
42 		    __field(u32, begin)
43 		    ),
44 
45 	    TP_fast_assign(
46 		    __assign_str(name, fence->name);
47 		    __entry->status = fence->status;
48 		    __entry->begin = begin;
49 		    ),
50 
51 	    TP_printk("%s name=%s state=%d", __entry->begin ? "begin" : "end",
52 		      __get_str(name), __entry->status)
53 );
54 
55 TRACE_EVENT(sync_pt,
56 	    TP_PROTO(struct sync_pt *pt),
57 
58 	    TP_ARGS(pt),
59 
60 	    TP_STRUCT__entry(
61 		    __string(timeline, pt->parent->name)
62 		    __array(char, value, 32)
63 		    ),
64 
65 	    TP_fast_assign(
66 		    __assign_str(timeline, pt->parent->name);
67 		    if (pt->parent->ops->pt_value_str) {
68 			    pt->parent->ops->pt_value_str(pt,
69 							__entry->value,
70 							sizeof(__entry->value));
71 		    } else {
72 			    __entry->value[0] = '\0';
73 		    }
74 		    ),
75 
76 	    TP_printk("name=%s value=%s", __get_str(timeline), __entry->value)
77 	);
78 
79 #endif /* if !defined(_TRACE_SYNC_H) || defined(TRACE_HEADER_MULTI_READ) */
80 
81 /* This part must be outside protection */
82 #include <trace/define_trace.h>
83