xref: /openbmc/linux/kernel/trace/rv/monitors/wip/wip.h (revision f3531d1a)
1 /*
2  * Automatically generated C representation of wip automaton
3  * For further information about this format, see kernel documentation:
4  *   Documentation/trace/rv/deterministic_automata.rst
5  */
6 
7 enum states_wip {
8 	preemptive_wip = 0,
9 	non_preemptive_wip,
10 	state_max_wip
11 };
12 
13 #define INVALID_STATE state_max_wip
14 
15 enum events_wip {
16 	preempt_disable_wip = 0,
17 	preempt_enable_wip,
18 	sched_waking_wip,
19 	event_max_wip
20 };
21 
22 struct automaton_wip {
23 	char *state_names[state_max_wip];
24 	char *event_names[event_max_wip];
25 	unsigned char function[state_max_wip][event_max_wip];
26 	unsigned char initial_state;
27 	bool final_states[state_max_wip];
28 };
29 
30 static const struct automaton_wip automaton_wip = {
31 	.state_names = {
32 		"preemptive",
33 		"non_preemptive"
34 	},
35 	.event_names = {
36 		"preempt_disable",
37 		"preempt_enable",
38 		"sched_waking"
39 	},
40 	.function = {
41 		{ non_preemptive_wip,      INVALID_STATE,      INVALID_STATE },
42 		{      INVALID_STATE,     preemptive_wip, non_preemptive_wip },
43 	},
44 	.initial_state = preemptive_wip,
45 	.final_states = { 1, 0 },
46 };
47