]> git.ipfire.org Git - thirdparty/linux.git/commit
verification/rvgen: Organise Kconfig entries for nested monitors
authorGabriele Monaco <gmonaco@redhat.com>
Wed, 23 Jul 2025 16:12:39 +0000 (18:12 +0200)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 24 Jul 2025 14:43:46 +0000 (10:43 -0400)
commit560473f2e2d77e153cb12ce1ef53c2abb6a5f0ca
tree8996ab59e74ca50b9783e2989379dc6eb6d64ed7
parent9efcf590827cd88cbb68b0f93b20c5f5add905f4
verification/rvgen: Organise Kconfig entries for nested monitors

The current behaviour of rvgen when running with the -a option is to
append the necessary lines at the end of the configuration for Kconfig,
Makefile and tracepoints.
This is not always the desired behaviour in case of nested monitors:
while tracepoints are not affected by nesting and the Makefile's only
requirement is that the parent monitor is built before its children, in
the Kconfig it is better to have children defined right after their
parent, otherwise the result has wrong indentation:

[*]   foo_parent monitor
[*]     foo_child1 monitor
[*]     foo_child2 monitor
[*]   bar_parent monitor
[*]     bar_child1 monitor
[*]     bar_child2 monitor
[*]   foo_child3 monitor
[*]   foo_child4 monitor

Adapt rvgen to look for a different marker for nested monitors in the
Kconfig file and append the line right after the last sibling, instead
of the last monitor.
Also add the marker when creating a new parent monitor.

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-5-gmonaco@redhat.com
Reviewed-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/rv/Kconfig
tools/verification/rvgen/rvgen/container.py
tools/verification/rvgen/rvgen/generator.py