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