From: Nam Cao <namcao@linutronix.de>
To: Gabriele Monaco <gmonaco@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Jonathan Corbet <corbet@lwn.net>,
Masami Hiramatsu <mhiramat@kernel.org>,
linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Tomas Glozar <tglozar@redhat.com>, Juri Lelli <jlelli@redhat.com>
Subject: Re: [RFC PATCH v2 07/12] rv: Adapt the sco monitor to the new set_state
Date: Mon, 19 May 2025 10:42:20 +0200 [thread overview]
Message-ID: <20250519084220.iProU-cg@linutronix.de> (raw)
In-Reply-To: <20250514084314.57976-8-gmonaco@redhat.com>
On Wed, May 14, 2025 at 10:43:09AM +0200, Gabriele Monaco wrote:
> .function = {
> - { thread_context_sco, scheduling_context_sco, INVALID_STATE },
> - { INVALID_STATE, INVALID_STATE, thread_context_sco },
> + { thread_context_sco, INVALID_STATE, scheduling_context_sco, INVALID_STATE },
> + { INVALID_STATE, scheduling_context_sco, INVALID_STATE, thread_context_sco },
This is over the 100 column limit.
I know it is not your fault, this is generated. Back when I was playing
with DA monitor, I made a patch to fix this. Maybe you could include it in
your series?
From b4fb648398a29a9c0d8e08bd12394978d3948a5e Mon Sep 17 00:00:00 2001
From: Nam Cao <namcao@linutronix.de>
Date: Fri, 15 Nov 2024 14:56:33 +0100
Subject: [PATCH] tools/rv/dot2c: Fix generated files going over 100 column
limit
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.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
tools/verification/rvgen/rvgen/dot2c.py | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/tools/verification/rvgen/rvgen/dot2c.py b/tools/verification/rvgen/rvgen/dot2c.py
index 6009caf568d9..abc0ee569b34 100644
--- a/tools/verification/rvgen/rvgen/dot2c.py
+++ b/tools/verification/rvgen/rvgen/dot2c.py
@@ -152,29 +152,22 @@ class Dot2c(Automata):
max_state_name = max(self.states, key = len).__len__()
return max(max_state_name, self.invalid_state_str.__len__())
- def __get_state_string_length(self):
- maxlen = self.__get_max_strlen_of_states() + self.enum_suffix.__len__()
- return "%" + str(maxlen) + "s"
-
def get_aut_init_function(self):
nr_states = self.states.__len__()
nr_events = self.events.__len__()
buff = []
- strformat = self.__get_state_string_length()
-
for x in range(nr_states):
- line = "\t\t{ "
+ buff.append("\t\t{")
for y in range(nr_events):
next_state = self.function[x][y]
if next_state != self.invalid_state_str:
next_state = self.function[x][y] + self.enum_suffix
if y != nr_events-1:
- line = line + strformat % next_state + ", "
+ buff.append(''.join(("\t\t\t", next_state, ",")))
else:
- line = line + strformat % next_state + " },"
- buff.append(line)
+ buff.append(''.join(("\t\t\t", next_state, "\n\t\t},")))
return self.__buff_to_string(buff)
--
2.39.5
Best regards,
Nam
next prev parent reply other threads:[~2025-05-19 8:42 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 8:43 [RFC PATCH v2 00/12] rv: Add monitors to validate task switch Gabriele Monaco
2025-05-14 8:43 ` [RFC PATCH v2 01/12] tools/rv: Do not skip idle in trace Gabriele Monaco
2025-05-14 8:43 ` [RFC PATCH v2 02/12] tools/rv: Stop gracefully also on SIGTERM Gabriele Monaco
2025-05-14 8:43 ` [RFC PATCH v2 03/12] rv: Add da_handle_start_run_event_ to per-task monitors Gabriele Monaco
2025-05-19 8:02 ` Nam Cao
2025-05-14 8:43 ` [RFC PATCH v2 04/12] rv: Remove trailing whitespace from tracepoint string Gabriele Monaco
2025-05-19 8:05 ` Nam Cao
2025-05-14 8:43 ` [RFC PATCH v2 05/12] rv: Return init error when registering monitors Gabriele Monaco
2025-05-19 8:06 ` Nam Cao
2025-05-14 8:43 ` [RFC PATCH v2 06/12] sched: Adapt sched tracepoints for RV task model Gabriele Monaco
2025-05-19 8:29 ` Nam Cao
2025-05-19 8:41 ` Gabriele Monaco
2025-05-19 8:43 ` Nam Cao
2025-05-14 8:43 ` [RFC PATCH v2 07/12] rv: Adapt the sco monitor to the new set_state Gabriele Monaco
2025-05-19 8:42 ` Nam Cao [this message]
2025-05-19 9:04 ` Gabriele Monaco
2025-05-14 8:43 ` [RFC PATCH v2 08/12] rv: Extend and adapt snroc model Gabriele Monaco
2025-05-14 8:43 ` [RFC PATCH v2 09/12] rv: Replace tss monitor with more complete sts Gabriele Monaco
2025-06-24 7:36 ` Nam Cao
2025-06-24 14:44 ` Gabriele Monaco
2025-06-24 15:50 ` Nam Cao
2025-06-24 19:31 ` Steven Rostedt
2025-06-27 15:02 ` Nam Cao
2025-05-14 8:43 ` [RFC PATCH v2 10/12] rv: Retry when da monitor detects race conditions Gabriele Monaco
2025-05-19 9:06 ` Nam Cao
2025-05-19 10:28 ` Gabriele Monaco
2025-05-19 10:38 ` Nam Cao
2025-05-19 11:13 ` Gabriele Monaco
2025-05-21 6:58 ` Nam Cao
2025-05-14 8:43 ` [RFC PATCH v2 11/12] rv: Add nrp and sssw per-task monitors Gabriele Monaco
2025-05-14 8:43 ` [RFC PATCH v2 12/12] rv: Add opid per-cpu monitor Gabriele Monaco
2025-05-15 11:55 ` kernel test robot
2025-05-27 13:37 ` Nam Cao
2025-05-27 14:35 ` Gabriele Monaco
2025-05-27 14:50 ` Nam Cao
2025-05-28 11:27 ` Gabriele Monaco
2025-05-21 7:15 ` [RFC PATCH v2 00/12] rv: Add monitors to validate task switch Nam Cao
2025-05-21 7:31 ` Gabriele Monaco
2025-05-27 13:51 ` Nam Cao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250519084220.iProU-cg@linutronix.de \
--to=namcao@linutronix.de \
--cc=corbet@lwn.net \
--cc=gmonaco@redhat.com \
--cc=jlelli@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglozar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.