Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / include / trace / events / rv.h
blob56592da9301c0c4d83157cbb1b9abd21d4dda688
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM rv
5 #if !defined(_TRACE_RV_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_RV_H
8 #include <linux/rv.h>
9 #include <linux/tracepoint.h>
11 #ifdef CONFIG_DA_MON_EVENTS_IMPLICIT
12 DECLARE_EVENT_CLASS(event_da_monitor,
14 TP_PROTO(char *state, char *event, char *next_state, bool final_state),
16 TP_ARGS(state, event, next_state, final_state),
18 TP_STRUCT__entry(
19 __array( char, state, MAX_DA_NAME_LEN )
20 __array( char, event, MAX_DA_NAME_LEN )
21 __array( char, next_state, MAX_DA_NAME_LEN )
22 __field( bool, final_state )
25 TP_fast_assign(
26 memcpy(__entry->state, state, MAX_DA_NAME_LEN);
27 memcpy(__entry->event, event, MAX_DA_NAME_LEN);
28 memcpy(__entry->next_state, next_state, MAX_DA_NAME_LEN);
29 __entry->final_state = final_state;
32 TP_printk("%s x %s -> %s %s",
33 __entry->state,
34 __entry->event,
35 __entry->next_state,
36 __entry->final_state ? "(final)" : "")
39 DECLARE_EVENT_CLASS(error_da_monitor,
41 TP_PROTO(char *state, char *event),
43 TP_ARGS(state, event),
45 TP_STRUCT__entry(
46 __array( char, state, MAX_DA_NAME_LEN )
47 __array( char, event, MAX_DA_NAME_LEN )
50 TP_fast_assign(
51 memcpy(__entry->state, state, MAX_DA_NAME_LEN);
52 memcpy(__entry->event, event, MAX_DA_NAME_LEN);
55 TP_printk("event %s not expected in the state %s",
56 __entry->event,
57 __entry->state)
60 #ifdef CONFIG_RV_MON_WIP
61 DEFINE_EVENT(event_da_monitor, event_wip,
62 TP_PROTO(char *state, char *event, char *next_state, bool final_state),
63 TP_ARGS(state, event, next_state, final_state));
65 DEFINE_EVENT(error_da_monitor, error_wip,
66 TP_PROTO(char *state, char *event),
67 TP_ARGS(state, event));
68 #endif /* CONFIG_RV_MON_WIP */
69 #endif /* CONFIG_DA_MON_EVENTS_IMPLICIT */
71 #ifdef CONFIG_DA_MON_EVENTS_ID
72 DECLARE_EVENT_CLASS(event_da_monitor_id,
74 TP_PROTO(int id, char *state, char *event, char *next_state, bool final_state),
76 TP_ARGS(id, state, event, next_state, final_state),
78 TP_STRUCT__entry(
79 __field( int, id )
80 __array( char, state, MAX_DA_NAME_LEN )
81 __array( char, event, MAX_DA_NAME_LEN )
82 __array( char, next_state, MAX_DA_NAME_LEN )
83 __field( bool, final_state )
86 TP_fast_assign(
87 memcpy(__entry->state, state, MAX_DA_NAME_LEN);
88 memcpy(__entry->event, event, MAX_DA_NAME_LEN);
89 memcpy(__entry->next_state, next_state, MAX_DA_NAME_LEN);
90 __entry->id = id;
91 __entry->final_state = final_state;
94 TP_printk("%d: %s x %s -> %s %s",
95 __entry->id,
96 __entry->state,
97 __entry->event,
98 __entry->next_state,
99 __entry->final_state ? "(final)" : "")
102 DECLARE_EVENT_CLASS(error_da_monitor_id,
104 TP_PROTO(int id, char *state, char *event),
106 TP_ARGS(id, state, event),
108 TP_STRUCT__entry(
109 __field( int, id )
110 __array( char, state, MAX_DA_NAME_LEN )
111 __array( char, event, MAX_DA_NAME_LEN )
114 TP_fast_assign(
115 memcpy(__entry->state, state, MAX_DA_NAME_LEN);
116 memcpy(__entry->event, event, MAX_DA_NAME_LEN);
117 __entry->id = id;
120 TP_printk("%d: event %s not expected in the state %s",
121 __entry->id,
122 __entry->event,
123 __entry->state)
126 #ifdef CONFIG_RV_MON_WWNR
127 /* id is the pid of the task */
128 DEFINE_EVENT(event_da_monitor_id, event_wwnr,
129 TP_PROTO(int id, char *state, char *event, char *next_state, bool final_state),
130 TP_ARGS(id, state, event, next_state, final_state));
132 DEFINE_EVENT(error_da_monitor_id, error_wwnr,
133 TP_PROTO(int id, char *state, char *event),
134 TP_ARGS(id, state, event));
135 #endif /* CONFIG_RV_MON_WWNR */
137 #endif /* CONFIG_DA_MON_EVENTS_ID */
138 #endif /* _TRACE_RV_H */
140 /* This part ust be outside protection */
141 #undef TRACE_INCLUDE_PATH
142 #include <trace/define_trace.h>