linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: Tomas Glozar <tglozar@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	linux-trace-kernel@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	Luis Goncalves <lgoncalv@redhat.com>
Subject: Re: [PATCH 3/6] rtla/osnoise: Set OSNOISE_WORKLOAD to true
Date: Thu, 20 Mar 2025 15:40:55 -0400 (EDT)	[thread overview]
Message-ID: <d55ba3cd-2de5-7520-a0b2-e5bcb6bad235@redhat.com> (raw)
In-Reply-To: <20250320092500.101385-4-tglozar@redhat.com>



On Thu, 20 Mar 2025, Tomas Glozar wrote:

> If running rtla osnoise with NO_OSNOISE_WORKLOAD, it reports no samples:
> 
> $ echo NO_OSNOISE_WORKLOAD > /sys/kernel/tracing/osnoise/options
> $ rtla osnoise hist -d 10s
> Index
> over: 0
> count: 0
> min: 0
> avg: 0
> max: 0
> 
> This situation can also happen when running rtla-osnoise after an
> improperly exited rtla-timerlat run.
> 
> Set OSNOISE_WORKLOAD in rtla-osnoise, too, similarly to what we
> already did for timerlat in commit 217f0b1e990e ("rtla/timerlat_top: Set
> OSNOISE_WORKLOAD for kernel threads") and commit d8d866171a41
> ("rtla/timerlat_hist: Set OSNOISE_WORKLOAD for kernel threads").
> 
> Note that there is no user workload mode for rtla-osnoise yet, so
> OSNOISE_WORKLOAD is always set to true.
> 
> Fixes: 1eceb2fc2ca5 ("rtla/osnoise: Add osnoise top mode")
> Fixes: 829a6c0b5698 ("rtla/osnoise: Add the hist mode")
> Signed-off-by: Tomas Glozar <tglozar@redhat.com>
> ---
>  tools/tracing/rtla/src/osnoise.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/tracing/rtla/src/osnoise.c b/tools/tracing/rtla/src/osnoise.c
> index 1735a36466c4..a71618d876e9 100644
> --- a/tools/tracing/rtla/src/osnoise.c
> +++ b/tools/tracing/rtla/src/osnoise.c
> @@ -1187,6 +1187,12 @@ osnoise_apply_config(struct osnoise_tool *tool, struct osnoise_params *params)
>  		auto_house_keeping(&params->monitored_cpus);
>  	}
>  
> +	retval = osnoise_set_workload(tool->context, true);
> +	if (retval < -1) {
> +		err_msg("Failed to set OSNOISE_WORKLOAD option\n");
> +		goto out_err;
> +	}
> +
>  	return 0;
>  
>  out_err:
> -- 
> 2.48.1
> 
> 
> 
Reviewed-by: John Kacur <jkacur@redhat.com>


  reply	other threads:[~2025-03-20 19:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20  9:24 [PATCH 0/6] rtla: Always set all tracer options Tomas Glozar
2025-03-20  9:24 ` [PATCH 1/6] rtla/osnoise: Unify params struct Tomas Glozar
2025-03-20 19:00   ` John Kacur
2025-03-24 16:06     ` Steven Rostedt
2025-03-20  9:24 ` [PATCH 2/6] rtla: Unify apply_config between top and hist Tomas Glozar
2025-03-20 19:27   ` John Kacur
2025-03-20  9:24 ` [PATCH 3/6] rtla/osnoise: Set OSNOISE_WORKLOAD to true Tomas Glozar
2025-03-20 19:40   ` John Kacur [this message]
2025-03-20  9:24 ` [PATCH 4/6] rtla: Always set all tracer options Tomas Glozar
2025-03-20 20:31   ` John Kacur
2025-03-20  9:24 ` [PATCH 5/6] rtla/tests: Reset osnoise options before check Tomas Glozar
2025-03-20 20:36   ` John Kacur
2025-03-20  9:25 ` [PATCH 6/6] rtla/tests: Test setting default options Tomas Glozar
2025-03-20 20:42   ` John Kacur

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=d55ba3cd-2de5-7520-a0b2-e5bcb6bad235@redhat.com \
    --to=jkacur@redhat.com \
    --cc=lgoncalv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.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 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).