rv: Add option for nested monitors and include schedMonitors describing complex systems, such as the scheduler, can easilygrow to the point where they are just hard to understand because of thema
rv: Add option for nested monitors and include schedMonitors describing complex systems, such as the scheduler, can easilygrow to the point where they are just hard to understand because of themany possible state transitions.Often it is possible to break such descriptions into smaller monitors,sharing some or all events. Enabling those smaller monitors concurrentlyis, in fact, testing the system as if we had one single larger monitor.Splitting models into multiple specification is not only easier tounderstand, but gives some more clues when we see errors.Add the possibility to create container monitors, whose only purpose isto host other nested monitors. Enabling a container monitor enables allnested ones, but it's still possible to enable nested monitorsindependently.Add the sched monitor as first container, for now empty.Cc: Ingo Molnar <mingo@redhat.com>Cc: Peter Zijlstra <peterz@infradead.org>Cc: Juri Lelli <juri.lelli@redhat.com>Link: https://lore.kernel.org/20250305140406.350227-3-gmonaco@redhat.comSigned-off-by: Gabriele Monaco <gmonaco@redhat.com>Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
rv: Add license identifiers to monitor filesSome monitor files like the main header and the Kconfig are missing thelicense identifier.Add it to those and make sure the automatic generation scrip
rv: Add license identifiers to monitor filesSome monitor files like the main header and the Kconfig are missing thelicense identifier.Add it to those and make sure the automatic generation script includesthe line in newly created monitors.Cc: Masami Hiramatsu <mhiramat@kernel.org>Cc: Ingo Molnar <mingo@redhat.com>Cc: Peter Zijlstra <peterz@infradead.org>Cc: Juri Lelli <juri.lelli@redhat.com>Link: https://lore.kernel.org/20250218123121.253551-3-gmonaco@redhat.comSigned-off-by: Gabriele Monaco <gmonaco@redhat.com>Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
rv: Simplify manual steps in monitor creationWhile creating a new monitor in RV, besides generating code from dot2k,there are a few manual steps which can be tedious and error prone, likeadding t
rv: Simplify manual steps in monitor creationWhile creating a new monitor in RV, besides generating code from dot2k,there are a few manual steps which can be tedious and error prone, likeadding the tracepoints, makefile lines and kconfig.This patch restructures the existing monitors to keep some files in themonitor's folder itself, which can be automatically generated by futureversions of dot2k.Monitors have now their own Kconfig and tracepoint snippets. Forsimplicity, the main tracepoint definition, is moved to the RVdirectory, it defines only the tracepoint classes and includes themonitor-specific tracepoints, which reside in the monitor directory.Tracepoints and Kconfig no longer need to be copied and adapted fromexisting ones but only need to be included in the main files.The Makefile remains untouched since there's little advantage in havinga separated Makefile for each monitor with a single line and includingit in the main RV Makefile.Cc: Juri Lelli <juri.lelli@redhat.com>Cc: Thomas Gleixner <tglx@linutronix.de>Cc: John Kacur <jkacur@redhat.com>Link: https://lore.kernel.org/20241227144752.362911-6-gmonaco@redhat.comSigned-off-by: Gabriele Monaco <gmonaco@redhat.com>Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
rv/monitors: Move monitor structure in rodataIt makes sense to move the important monitor structure into rodata toprevent accidental structure modification.Link: https://lkml.kernel.org/r/202211
rv/monitors: Move monitor structure in rodataIt makes sense to move the important monitor structure into rodata toprevent accidental structure modification.Link: https://lkml.kernel.org/r/20221122173648.4732-1-acarmina@redhat.comSigned-off-by: Alessandro Carminati <acarmina@redhat.com>Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
rv/monitor: Add __init/__exit annotations to module init/exit funcsAdd missing __init/__exit annotations to module init/exit funcs.Link: https://lkml.kernel.org/r/20220922103208.162869-1-xiujianf
rv/monitor: Add __init/__exit annotations to module init/exit funcsAdd missing __init/__exit annotations to module init/exit funcs.Link: https://lkml.kernel.org/r/20220922103208.162869-1-xiujianfeng@huawei.comFixes: 24bce201d798 ("tools/rv: Add dot2k")Fixes: 8812d21219b9 ("rv/monitor: Add the wip monitor skeleton created by dot2k")Fixes: ccc319dcb450 ("rv/monitor: Add the wwnr monitor")Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
rv/monitors: add 'static' qualifier for local symbolsThe sparse tool complains as follows:kernel/trace/rv/monitors/wwnr/wwnr.c:18:19:warning: symbol 'rv_wwnr' was not declared. Should it be stat
rv/monitors: add 'static' qualifier for local symbolsThe sparse tool complains as follows:kernel/trace/rv/monitors/wwnr/wwnr.c:18:19:warning: symbol 'rv_wwnr' was not declared. Should it be static?The `rv_wwnr` symbol is not dereferenced by other extern files,so add static qualifier for it.So does wip module.Link: https://lkml.kernel.org/r/20220824034357.2014202-2-zengheng4@huawei.comCc: <mingo@redhat.com>Fixes: ccc319dcb450 ("rv/monitor: Add the wwnr monitor")Fixes: 8812d21219b9 ("rv/monitor: Add the wip monitor skeleton created by dot2k")Signed-off-by: Zeng Heng <zengheng4@huawei.com>Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
rv/monitors: Make monitor's automata definition staticMonitor's automata definition is only used locally, so makethem static for all existing monitors.Link: https://lore.kernel.org/all/202208210
rv/monitors: Make monitor's automata definition staticMonitor's automata definition is only used locally, so makethem static for all existing monitors.Link: https://lore.kernel.org/all/202208210332.gtHXje45-lkp@intel.comLink: https://lore.kernel.org/all/202208210358.6HH3OrVs-lkp@intel.comLink: https://lkml.kernel.org/r/a50e27c3738d6ef809f4201857229fed64799234.1661266564.git.bristot@kernel.orgFixes: ccc319dcb450 ("rv/monitor: Add the wwnr monitor")Fixes: 8812d21219b9 ("rv/monitor: Add the wip monitor skeleton created by dot2k")Reported-by: kernel test robot <lkp@intel.com>Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
rv/monitor: Add the wip monitorThe wakeup in preemptive (wip) monitor verifies if thewakeup events always take place with preemption disabled: | |
rv/monitor: Add the wip monitorThe wakeup in preemptive (wip) monitor verifies if thewakeup events always take place with preemption disabled: | | v #==================# H preemptive H <+ #==================# | | | | preempt_disable | preempt_enable v | sched_waking +------------------+ | +--------------- | | | | | non_preemptive | | +--------------> | | -+ +------------------+The wakeup event always takes place with preemption disabled becauseof the scheduler synchronization. However, because the preempt_countand its trace event are not atomic with regard to interrupts, someinconsistencies might happen.The documentation illustrates one of these cases.Link: https://lkml.kernel.org/r/c98ca678df81115fddc04921b3c79720c836b18f.1659052063.git.bristot@kernel.orgCc: Wim Van Sebroeck <wim@linux-watchdog.org>Cc: Guenter Roeck <linux@roeck-us.net>Cc: Jonathan Corbet <corbet@lwn.net>Cc: Ingo Molnar <mingo@redhat.com>Cc: Thomas Gleixner <tglx@linutronix.de>Cc: Peter Zijlstra <peterz@infradead.org>Cc: Will Deacon <will@kernel.org>Cc: Catalin Marinas <catalin.marinas@arm.com>Cc: Marco Elver <elver@google.com>Cc: Dmitry Vyukov <dvyukov@google.com>Cc: "Paul E. McKenney" <paulmck@kernel.org>Cc: Shuah Khan <skhan@linuxfoundation.org>Cc: Gabriele Paoloni <gpaoloni@redhat.com>Cc: Juri Lelli <juri.lelli@redhat.com>Cc: Clark Williams <williams@redhat.com>Cc: Tao Zhou <tao.zhou@linux.dev>Cc: Randy Dunlap <rdunlap@infradead.org>Cc: linux-doc@vger.kernel.orgCc: linux-kernel@vger.kernel.orgCc: linux-trace-devel@vger.kernel.orgSigned-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
rv/monitor: Add the wip monitor skeleton created by dot2kTHIS CODE IS NOT LINKED TO THE MAKEFILE.This model does not compile because it lacks the instrumentationpart, which will be added next. I
rv/monitor: Add the wip monitor skeleton created by dot2kTHIS CODE IS NOT LINKED TO THE MAKEFILE.This model does not compile because it lacks the instrumentationpart, which will be added next. In the typical case, there will beonly one patch, but it was split into two patches for educationalpurposes.This is the direct output this command line: $ dot2k -d tools/verification/models/wip.dot -t per_cpuLink: https://lkml.kernel.org/r/5eb7a9118917e8a814c5e49853a72fc62be0a101.1659052063.git.bristot@kernel.orgCc: Wim Van Sebroeck <wim@linux-watchdog.org>Cc: Guenter Roeck <linux@roeck-us.net>Cc: Jonathan Corbet <corbet@lwn.net>Cc: Ingo Molnar <mingo@redhat.com>Cc: Thomas Gleixner <tglx@linutronix.de>Cc: Peter Zijlstra <peterz@infradead.org>Cc: Will Deacon <will@kernel.org>Cc: Catalin Marinas <catalin.marinas@arm.com>Cc: Marco Elver <elver@google.com>Cc: Dmitry Vyukov <dvyukov@google.com>Cc: "Paul E. McKenney" <paulmck@kernel.org>Cc: Shuah Khan <skhan@linuxfoundation.org>Cc: Gabriele Paoloni <gpaoloni@redhat.com>Cc: Juri Lelli <juri.lelli@redhat.com>Cc: Clark Williams <williams@redhat.com>Cc: Tao Zhou <tao.zhou@linux.dev>Cc: Randy Dunlap <rdunlap@infradead.org>Cc: linux-doc@vger.kernel.orgCc: linux-kernel@vger.kernel.orgCc: linux-trace-devel@vger.kernel.orgSigned-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>