1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM rv
5 #if !defined(_TRACE_RV_H) || defined(TRACE_HEADER_MULTI_READ)
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),
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 )
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",
36 __entry->final_state ? "(final)" : "")
39 DECLARE_EVENT_CLASS(error_da_monitor,
41 TP_PROTO(char *state, char *event),
43 TP_ARGS(state, event),
46 __array( char, state, MAX_DA_NAME_LEN )
47 __array( char, event, MAX_DA_NAME_LEN )
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",
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),
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 )
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);
91 __entry->final_state = final_state;
94 TP_printk("%d: %s x %s -> %s %s",
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),
110 __array( char, state, MAX_DA_NAME_LEN )
111 __array( char, event, MAX_DA_NAME_LEN )
115 memcpy(__entry->state, state, MAX_DA_NAME_LEN);
116 memcpy(__entry->event, event, MAX_DA_NAME_LEN);
120 TP_printk("%d: event %s not expected in the state %s",
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>