linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriele Monaco <gmonaco@redhat.com>
To: Nam Cao <namcao@linutronix.de>,
	Steven Rostedt <rostedt@goodmis.org>,
	 Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
		linux-trace-kernel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/5] verification/rvgen/ltl: Support per-cpu monitor generation
Date: Thu, 07 Aug 2025 15:06:38 +0200	[thread overview]
Message-ID: <6754c61d60fc161963d0625a4b647a241b363fc5.camel@redhat.com> (raw)
In-Reply-To: <ccfa5ee80e6114b046f04dc1bf1de0c4e7a11c09.1754466623.git.namcao@linutronix.de>

On Wed, 2025-08-06 at 10:01 +0200, Nam Cao wrote:
> Add support to generate per-cpu LTL monitors. Similar to generating
> per-cpu monitors from .dot files, the "-t per_cpu" parameter can be
> used to generate per-cpu monitors from .ltl files.
> 
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> ---
> v2: Rename "implicit" to "cpu"
> ---
>  
> -static void ltl_atoms_init(struct task_struct *task, struct
> ltl_monitor *mon, bool task_creation)
> +static void ltl_atoms_init(%%TARGET_ARG%%, struct ltl_monitor *mon,
> bool target_creation)
>  {
>  	/*
>  	 * This should initialize as many atomic propositions as
> possible.
>  	 *
> -	 * @task_creation indicates whether the task is being
> created. This is
> -	 * false if the task is already running before the monitor
> is enabled.
> +	 * @target_creation indicates whether the monitored target
> is being
> +	 * created. This is false if the monitor target is already
> online before
> +	 * the monitor is enabled.

I get you're trying to be more type-agnostic, but I believe this
/online/ is a bit imprecise, unless you register a hotplug handler and
just initialise the online CPUs (much of an overkill I'd say).
What about something like "this is false if the monitor exists already
before the monitor is enabled"

Other than that it looks good to me.

Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>

Thanks,
Gabriele

>  	 */
>  %%ATOMS_INIT%%
>  }
> diff --git a/tools/verification/rvgen/rvgen/templates/ltl2k/trace.h
> b/tools/verification/rvgen/rvgen/templates/ltl2k/trace.h
> index 49394c4b0f1c..87d3a1308926 100644
> --- a/tools/verification/rvgen/rvgen/templates/ltl2k/trace.h
> +++ b/tools/verification/rvgen/rvgen/templates/ltl2k/trace.h
> @@ -6,9 +6,8 @@
>  
>  #ifdef CONFIG_RV_MON_%%MODEL_NAME_UP%%
>  DEFINE_EVENT(event_%%MONITOR_CLASS%%, event_%%MODEL_NAME%%,
> -	     TP_PROTO(struct task_struct *task, char *states, char
> *atoms, char *next),
> -	     TP_ARGS(task, states, atoms, next));
> +%%TRACEPOINT_ARGS_SKEL_EVENT%%);
> +
>  DEFINE_EVENT(error_%%MONITOR_CLASS%%, error_%%MODEL_NAME%%,
> -	     TP_PROTO(struct task_struct *task),
> -	     TP_ARGS(task));
> +%%TRACEPOINT_ARGS_SKEL_ERROR%%);
>  #endif /* CONFIG_RV_MON_%%MODEL_NAME_UP%% */


  reply	other threads:[~2025-08-07 13:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06  8:01 [PATCH v2 0/5] rv: LTL per-cpu monitor type and real-time scheduling monitor Nam Cao
2025-08-06  8:01 ` [PATCH v2 1/5] rv/ltl: Prepare for other monitor types Nam Cao
2025-08-06  8:01 ` [PATCH v2 2/5] rv/ltl: Support per-cpu monitors Nam Cao
2025-08-07 13:28   ` Gabriele Monaco
2025-08-06  8:01 ` [PATCH v2 3/5] verification/rvgen/ltl: Support per-cpu monitor generation Nam Cao
2025-08-07 13:06   ` Gabriele Monaco [this message]
2025-08-08  5:12     ` Nam Cao
2025-08-08  6:21       ` Gabriele Monaco
2025-08-08  6:30         ` Nam Cao
2025-08-06  8:01 ` [PATCH v2 4/5] sched: Add task enqueue/dequeue trace points Nam Cao
2025-08-15 13:40   ` Peter Zijlstra
2025-08-15 13:52     ` Peter Zijlstra
2025-08-21  7:05       ` Nam Cao
2025-08-21  8:43         ` K Prateek Nayak
2025-08-19  7:49     ` Nam Cao
2025-08-19  8:24       ` Peter Zijlstra
2025-08-06  8:01 ` [PATCH v2 5/5] rv: Add rts monitor Nam Cao
2025-08-06 20:28   ` kernel test robot
2025-08-07 13:33   ` Gabriele Monaco
2025-08-08  5:13     ` Nam Cao
2025-08-07 14:34   ` Gabriele Monaco
2025-08-08  5:29     ` Nam Cao
2025-08-08  7:30       ` Gabriele Monaco
2025-08-15 13:48   ` Peter Zijlstra
2025-08-19  7:54     ` 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=6754c61d60fc161963d0625a4b647a241b363fc5.camel@redhat.com \
    --to=gmonaco@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=namcao@linutronix.de \
    --cc=rostedt@goodmis.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).