summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/src/timerlat_bpf.c
diff options
context:
space:
mode:
authorCrystal Wood <crwood@redhat.com>2025-09-06 21:23:20 -0500
committerSteven Rostedt (Google) <rostedt@goodmis.org>2025-09-27 04:52:17 -0400
commit5742bf62e6d3070f04a2ea688758431537076129 (patch)
tree59c4f52f20fef94922b6e25cd76bd8df7ba97305 /tools/tracing/rtla/src/timerlat_bpf.c
parent344823886eafe5fe17ed788b00e463666c2183b4 (diff)
tools/rtla: Move top/hist params into common struct
The hist members were very similar between timerlat and top, so just use one common hist struct. output_divisor, quiet, and pretty printing are pretty generic concepts that can go in the main struct even if not every specific tool (currently) uses them. Cc: John Kacur <jkacur@redhat.com> Cc: Costa Shulyupin <costa.shul@redhat.com> Link: https://lore.kernel.org/20250907022325.243930-3-crwood@redhat.com Reviewed-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: Crystal Wood <crwood@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools/tracing/rtla/src/timerlat_bpf.c')
-rw-r--r--tools/tracing/rtla/src/timerlat_bpf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/tracing/rtla/src/timerlat_bpf.c b/tools/tracing/rtla/src/timerlat_bpf.c
index a6c77ac55e00..03be2606f54a 100644
--- a/tools/tracing/rtla/src/timerlat_bpf.c
+++ b/tools/tracing/rtla/src/timerlat_bpf.c
@@ -21,20 +21,20 @@ int timerlat_bpf_init(struct timerlat_params *params)
return 1;
/* Pass common options */
- bpf->rodata->output_divisor = params->output_divisor;
- bpf->rodata->entries = params->entries;
+ bpf->rodata->output_divisor = params->common.output_divisor;
+ bpf->rodata->entries = params->common.hist.entries;
bpf->rodata->irq_threshold = params->common.stop_us;
bpf->rodata->thread_threshold = params->common.stop_total_us;
bpf->rodata->aa_only = params->aa_only;
- if (params->entries != 0) {
+ if (params->common.hist.entries != 0) {
/* Pass histogram options */
- bpf->rodata->bucket_size = params->bucket_size;
+ bpf->rodata->bucket_size = params->common.hist.bucket_size;
/* Set histogram array sizes */
- bpf_map__set_max_entries(bpf->maps.hist_irq, params->entries);
- bpf_map__set_max_entries(bpf->maps.hist_thread, params->entries);
- bpf_map__set_max_entries(bpf->maps.hist_user, params->entries);
+ bpf_map__set_max_entries(bpf->maps.hist_irq, params->common.hist.entries);
+ bpf_map__set_max_entries(bpf->maps.hist_thread, params->common.hist.entries);
+ bpf_map__set_max_entries(bpf->maps.hist_user, params->common.hist.entries);
} else {
/* No entries, disable histogram */
bpf_map__set_autocreate(bpf->maps.hist_irq, false);