[PATCH 0/5] tools/verification: Improvements to rv and rvgen

Gabriele Monaco posted 5 patches 2 months, 2 weeks ago
kernel/trace/rv/Kconfig                       |  5 +++++
kernel/trace/rv/monitors/sched/sched.c        |  3 +--
kernel/trace/rv/monitors/sco/sco.c            |  3 +--
kernel/trace/rv/monitors/scpd/scpd.c          |  3 +--
kernel/trace/rv/monitors/sncid/sncid.c        |  3 +--
kernel/trace/rv/monitors/snep/snep.c          |  3 +--
kernel/trace/rv/monitors/snep/snep.h          | 14 +++++++++++--
kernel/trace/rv/monitors/snroc/snroc.c        |  3 +--
kernel/trace/rv/monitors/tss/tss.c            |  3 +--
kernel/trace/rv/monitors/wip/wip.c            |  3 +--
kernel/trace/rv/monitors/wwnr/wwnr.c          |  3 +--
tools/verification/rv/src/in_kernel.c         |  4 ++--
tools/verification/rv/src/rv.c                |  1 +
tools/verification/rvgen/rvgen/container.py   | 10 ++++++++++
tools/verification/rvgen/rvgen/dot2c.py       | 20 ++++++++++---------
tools/verification/rvgen/rvgen/generator.py   | 16 ++++++++++-----
.../rvgen/rvgen/templates/container/main.c    |  3 +--
.../rvgen/rvgen/templates/dot2k/main.c        |  3 +--
18 files changed, 63 insertions(+), 40 deletions(-)
[PATCH 0/5] tools/verification: Improvements to rv and rvgen
Posted by Gabriele Monaco 2 months, 2 weeks ago
This series introduces various improvements to the rv/rvgen tools as
first posted in [1]. It also adapts generated kernel files accordingly.

Specifically:

Patch 1 fixes the behaviour of the rv tool with -s and idle tasks.

Patch 2 allows the rv tool to gracefully terminate with SIGTERM

Patch 3 adjusts dot2c not to create lines over 100 columns

Patch 4 properly orders nested monitors in the RV Kconfig file

Patch 5 returns the registration error in all DA monitor instead of 0

This series is based on the linux-next tree.

Changes since [1]:
* Cleanup python code to improve PEP8 compliance
* Fix condition for long line in dot2c

[1] - https://lore.kernel.org/lkml/20250721082325.71554-1-gmonaco@redhat.com

To: Steven Rostedt <rostedt@goodmis.org>
To: Nam Cao <namcao@linutronix.de>
Cc: Tomas Glozar <tglozar@redhat.com>
Cc: Juri Lelli <jlelli@redhat.com>
Cc: Clark Williams <williams@redhat.com>
Cc: John Kacur <jkacur@redhat.com>

Gabriele Monaco (5):
  tools/rv: Do not skip idle in trace
  tools/rv: Stop gracefully also on SIGTERM
  tools/dot2c: Fix generated files going over 100 column limit
  verification/rvgen: Organise Kconfig entries for nested monitors
  rv: Return init error when registering monitors

 kernel/trace/rv/Kconfig                       |  5 +++++
 kernel/trace/rv/monitors/sched/sched.c        |  3 +--
 kernel/trace/rv/monitors/sco/sco.c            |  3 +--
 kernel/trace/rv/monitors/scpd/scpd.c          |  3 +--
 kernel/trace/rv/monitors/sncid/sncid.c        |  3 +--
 kernel/trace/rv/monitors/snep/snep.c          |  3 +--
 kernel/trace/rv/monitors/snep/snep.h          | 14 +++++++++++--
 kernel/trace/rv/monitors/snroc/snroc.c        |  3 +--
 kernel/trace/rv/monitors/tss/tss.c            |  3 +--
 kernel/trace/rv/monitors/wip/wip.c            |  3 +--
 kernel/trace/rv/monitors/wwnr/wwnr.c          |  3 +--
 tools/verification/rv/src/in_kernel.c         |  4 ++--
 tools/verification/rv/src/rv.c                |  1 +
 tools/verification/rvgen/rvgen/container.py   | 10 ++++++++++
 tools/verification/rvgen/rvgen/dot2c.py       | 20 ++++++++++---------
 tools/verification/rvgen/rvgen/generator.py   | 16 ++++++++++-----
 .../rvgen/rvgen/templates/container/main.c    |  3 +--
 .../rvgen/rvgen/templates/dot2k/main.c        |  3 +--
 18 files changed, 63 insertions(+), 40 deletions(-)


base-commit: a933d3dc1968fcfb0ab72879ec304b1971ed1b9a
-- 
2.50.1
Re: [PATCH 0/5] tools/verification: Improvements to rv and rvgen
Posted by Steven Rostedt 2 months, 1 week ago
BTW, please make sure that the cover letter is Cc'd to
linux-trace-kernel@vger.kernel.org along with the patches. I use patchwork
to see the cover letter, but it's not present when it's not Cc'd.

Thanks,

-- Steve


On Wed, 23 Jul 2025 18:12:35 +0200
Gabriele Monaco <gmonaco@redhat.com> wrote:

> This series introduces various improvements to the rv/rvgen tools as
> first posted in [1]. It also adapts generated kernel files accordingly.
> 
> Specifically:
> 
> Patch 1 fixes the behaviour of the rv tool with -s and idle tasks.
> 
> Patch 2 allows the rv tool to gracefully terminate with SIGTERM
> 
> Patch 3 adjusts dot2c not to create lines over 100 columns
> 
> Patch 4 properly orders nested monitors in the RV Kconfig file
> 
> Patch 5 returns the registration error in all DA monitor instead of 0
> 
> This series is based on the linux-next tree.
> 
> Changes since [1]:
> * Cleanup python code to improve PEP8 compliance
> * Fix condition for long line in dot2c
> 
> [1] - https://lore.kernel.org/lkml/20250721082325.71554-1-gmonaco@redhat.com
> 
> To: Steven Rostedt <rostedt@goodmis.org>
> To: Nam Cao <namcao@linutronix.de>
> Cc: Tomas Glozar <tglozar@redhat.com>
> Cc: Juri Lelli <jlelli@redhat.com>
> Cc: Clark Williams <williams@redhat.com>
> Cc: John Kacur <jkacur@redhat.com>
> 
> Gabriele Monaco (5):
>   tools/rv: Do not skip idle in trace
>   tools/rv: Stop gracefully also on SIGTERM
>   tools/dot2c: Fix generated files going over 100 column limit
>   verification/rvgen: Organise Kconfig entries for nested monitors
>   rv: Return init error when registering monitors
> 
>  kernel/trace/rv/Kconfig                       |  5 +++++
>  kernel/trace/rv/monitors/sched/sched.c        |  3 +--
>  kernel/trace/rv/monitors/sco/sco.c            |  3 +--
>  kernel/trace/rv/monitors/scpd/scpd.c          |  3 +--
>  kernel/trace/rv/monitors/sncid/sncid.c        |  3 +--
>  kernel/trace/rv/monitors/snep/snep.c          |  3 +--
>  kernel/trace/rv/monitors/snep/snep.h          | 14 +++++++++++--
>  kernel/trace/rv/monitors/snroc/snroc.c        |  3 +--
>  kernel/trace/rv/monitors/tss/tss.c            |  3 +--
>  kernel/trace/rv/monitors/wip/wip.c            |  3 +--
>  kernel/trace/rv/monitors/wwnr/wwnr.c          |  3 +--
>  tools/verification/rv/src/in_kernel.c         |  4 ++--
>  tools/verification/rv/src/rv.c                |  1 +
>  tools/verification/rvgen/rvgen/container.py   | 10 ++++++++++
>  tools/verification/rvgen/rvgen/dot2c.py       | 20 ++++++++++---------
>  tools/verification/rvgen/rvgen/generator.py   | 16 ++++++++++-----
>  .../rvgen/rvgen/templates/container/main.c    |  3 +--
>  .../rvgen/rvgen/templates/dot2k/main.c        |  3 +--
>  18 files changed, 63 insertions(+), 40 deletions(-)
> 
> 
> base-commit: a933d3dc1968fcfb0ab72879ec304b1971ed1b9a
Re: [PATCH 0/5] tools/verification: Improvements to rv and rvgen
Posted by Gabriele Monaco 2 months, 1 week ago
On Tue, 2025-07-29 at 17:18 -0400, Steven Rostedt wrote:
> 
> BTW, please make sure that the cover letter is Cc'd to
> linux-trace-kernel@vger.kernel.org along with the patches. I use
> patchwork to see the cover letter, but it's not present when it's not
> Cc'd.
> 

Uh, right, will do!

Thanks,
Gabriele

> Thanks,
> 
> -- Steve
> 
> 
> On Wed, 23 Jul 2025 18:12:35 +0200
> Gabriele Monaco <gmonaco@redhat.com> wrote:
> 
> > This series introduces various improvements to the rv/rvgen tools
> > as
> > first posted in [1]. It also adapts generated kernel files
> > accordingly.
> > 
> > Specifically:
> > 
> > Patch 1 fixes the behaviour of the rv tool with -s and idle tasks.
> > 
> > Patch 2 allows the rv tool to gracefully terminate with SIGTERM
> > 
> > Patch 3 adjusts dot2c not to create lines over 100 columns
> > 
> > Patch 4 properly orders nested monitors in the RV Kconfig file
> > 
> > Patch 5 returns the registration error in all DA monitor instead of
> > 0
> > 
> > This series is based on the linux-next tree.
> > 
> > Changes since [1]:
> > * Cleanup python code to improve PEP8 compliance
> > * Fix condition for long line in dot2c
> > 
> > [1] -
> > https://lore.kernel.org/lkml/20250721082325.71554-1-gmonaco@redhat.com
> > 
> > To: Steven Rostedt <rostedt@goodmis.org>
> > To: Nam Cao <namcao@linutronix.de>
> > Cc: Tomas Glozar <tglozar@redhat.com>
> > Cc: Juri Lelli <jlelli@redhat.com>
> > Cc: Clark Williams <williams@redhat.com>
> > Cc: John Kacur <jkacur@redhat.com>
> > 
> > Gabriele Monaco (5):
> >   tools/rv: Do not skip idle in trace
> >   tools/rv: Stop gracefully also on SIGTERM
> >   tools/dot2c: Fix generated files going over 100 column limit
> >   verification/rvgen: Organise Kconfig entries for nested monitors
> >   rv: Return init error when registering monitors
> > 
> >  kernel/trace/rv/Kconfig                       |  5 +++++
> >  kernel/trace/rv/monitors/sched/sched.c        |  3 +--
> >  kernel/trace/rv/monitors/sco/sco.c            |  3 +--
> >  kernel/trace/rv/monitors/scpd/scpd.c          |  3 +--
> >  kernel/trace/rv/monitors/sncid/sncid.c        |  3 +--
> >  kernel/trace/rv/monitors/snep/snep.c          |  3 +--
> >  kernel/trace/rv/monitors/snep/snep.h          | 14 +++++++++++--
> >  kernel/trace/rv/monitors/snroc/snroc.c        |  3 +--
> >  kernel/trace/rv/monitors/tss/tss.c            |  3 +--
> >  kernel/trace/rv/monitors/wip/wip.c            |  3 +--
> >  kernel/trace/rv/monitors/wwnr/wwnr.c          |  3 +--
> >  tools/verification/rv/src/in_kernel.c         |  4 ++--
> >  tools/verification/rv/src/rv.c                |  1 +
> >  tools/verification/rvgen/rvgen/container.py   | 10 ++++++++++
> >  tools/verification/rvgen/rvgen/dot2c.py       | 20 ++++++++++-----
> > ----
> >  tools/verification/rvgen/rvgen/generator.py   | 16 ++++++++++-----
> >  .../rvgen/rvgen/templates/container/main.c    |  3 +--
> >  .../rvgen/rvgen/templates/dot2k/main.c        |  3 +--
> >  18 files changed, 63 insertions(+), 40 deletions(-)
> > 
> > 
> > base-commit: a933d3dc1968fcfb0ab72879ec304b1971ed1b9a
Re: [PATCH 0/5] tools/verification: Improvements to rv and rvgen
Posted by Steven Rostedt 2 months, 1 week ago
On Wed, 23 Jul 2025 18:12:35 +0200
Gabriele Monaco <gmonaco@redhat.com> wrote:

> This series introduces various improvements to the rv/rvgen tools as
> first posted in [1]. It also adapts generated kernel files accordingly.
> 
> Specifically:
> 
> Patch 1 fixes the behaviour of the rv tool with -s and idle tasks.
> 
> Patch 2 allows the rv tool to gracefully terminate with SIGTERM
> 
> Patch 3 adjusts dot2c not to create lines over 100 columns
> 
> Patch 4 properly orders nested monitors in the RV Kconfig file

So keeping tools and kernel separate for RV is proving to be quite a
pain as patch 4 has conflicts. I'm going to make a third topic branch
just for RV. This will include anything in tools/verification and
kernel/trace/rv. I'll restructure the patches I already added and move
them into this branch, so that all the RV related work is there and not
in the latency or tools branches.

So no need to separate RV into kernel and tooling anymore.

> 
> Patch 5 returns the registration error in all DA monitor instead of 0
> 
> This series is based on the linux-next tree.

The topic branches I'll have is:

tools - for things like rtla
latency - for the latency tracers (osnoise, etc)
rv - for the runtime verification work.

-- Steve
Re: [PATCH 0/5] tools/verification: Improvements to rv and rvgen
Posted by Gabriele Monaco 2 months, 1 week ago
2025-07-24T14:40:23Z Steven Rostedt <rostedt@goodmis.org>:

> On Wed, 23 Jul 2025 18:12:35 +0200
> Gabriele Monaco <gmonaco@redhat.com> wrote:
>
>> This series introduces various improvements to the rv/rvgen tools as
>> first posted in [1]. It also adapts generated kernel files accordingly.
>>
> So keeping tools and kernel separate for RV is proving to be quite a
> pain as patch 4 has conflicts. I'm going to make a third topic branch
> just for RV. This will include anything in tools/verification and
> kernel/trace/rv. I'll restructure the patches I already added and move
> them into this branch, so that all the RV related work is there and not
> in the latency or tools branches.
>
> So no need to separate RV into kernel and tooling anymore.
>

Alright, but I guess going forward I'll try to keep changes separated anyway, if possible.

Right, 4 is problematic here, it should apply cleanly on next though, maybe I should have rebased on your tree instead..

So do I submit together 4,5 and the kernel ones? Or again all together?

Thanks,
Gabriele

> The topic branches I'll have is:
>
> tools - for things like rtla
> latency - for the latency tracers (osnoise, etc)
> rv - for the runtime verification work.
Re: [PATCH 0/5] tools/verification: Improvements to rv and rvgen
Posted by Steven Rostedt 2 months, 1 week ago
On Thu, 24 Jul 2025 18:07:35 +0000 (UTC)
Gabriele Monaco <gmonaco@redhat.com> wrote:

> Alright, but I guess going forward I'll try to keep changes separated anyway, if possible.
> 
> Right, 4 is problematic here, it should apply cleanly on next though, maybe I should have rebased on your tree instead..
> 
> So do I submit together 4,5 and the kernel ones? Or again all together?

If you haven't noticed, I already just took it ;-)

-- Steve