Skip to content

Commit

Permalink
rtla/osnoise: Set OSNOISE_WORKLOAD to true
Browse files Browse the repository at this point in the history
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 217f0b1 ("rtla/timerlat_top: Set
OSNOISE_WORKLOAD for kernel threads") and commit d8d8661
("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.

Cc: Luis Goncalves <lgoncalv@redhat.com>
Link: https://lore.kernel.org/20250320092500.101385-4-tglozar@redhat.com
Fixes: 1eceb2f ("rtla/osnoise: Add osnoise top mode")
Fixes: 829a6c0 ("rtla/osnoise: Add the hist mode")
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Reviewed-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
  • Loading branch information
Tomas Glozar authored and Steven Rostedt (Google) committed Mar 26, 2025
1 parent 20d6b07 commit a8122a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/tracing/rtla/src/osnoise.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a8122a6

Please sign in to comment.