mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-17 08:09:02 +00:00

The dot2c.py script generates all states in a single line. This breaks the 100 column limit when the state machines are non-trivial. Change dot2c.py to generate the states in separate lines in case the generated line is going to be too long. Also adapt existing monitors with line length over the limit. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Tomas Glozar <tglozar@redhat.com> Cc: Juri Lelli <jlelli@redhat.com> Cc: Clark Williams <williams@redhat.com> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20250723161240.194860-4-gmonaco@redhat.com Suggested-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
60 lines
1.2 KiB
C
60 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Automatically generated C representation of snep automaton
|
|
* For further information about this format, see kernel documentation:
|
|
* Documentation/trace/rv/deterministic_automata.rst
|
|
*/
|
|
|
|
enum states_snep {
|
|
non_scheduling_context_snep = 0,
|
|
scheduling_contex_snep,
|
|
state_max_snep
|
|
};
|
|
|
|
#define INVALID_STATE state_max_snep
|
|
|
|
enum events_snep {
|
|
preempt_disable_snep = 0,
|
|
preempt_enable_snep,
|
|
schedule_entry_snep,
|
|
schedule_exit_snep,
|
|
event_max_snep
|
|
};
|
|
|
|
struct automaton_snep {
|
|
char *state_names[state_max_snep];
|
|
char *event_names[event_max_snep];
|
|
unsigned char function[state_max_snep][event_max_snep];
|
|
unsigned char initial_state;
|
|
bool final_states[state_max_snep];
|
|
};
|
|
|
|
static const struct automaton_snep automaton_snep = {
|
|
.state_names = {
|
|
"non_scheduling_context",
|
|
"scheduling_contex"
|
|
},
|
|
.event_names = {
|
|
"preempt_disable",
|
|
"preempt_enable",
|
|
"schedule_entry",
|
|
"schedule_exit"
|
|
},
|
|
.function = {
|
|
{
|
|
non_scheduling_context_snep,
|
|
non_scheduling_context_snep,
|
|
scheduling_contex_snep,
|
|
INVALID_STATE
|
|
},
|
|
{
|
|
INVALID_STATE,
|
|
INVALID_STATE,
|
|
INVALID_STATE,
|
|
non_scheduling_context_snep
|
|
},
|
|
},
|
|
.initial_state = non_scheduling_context_snep,
|
|
.final_states = { 1, 0 },
|
|
};
|