Ășt 1. 7. 2025 v 8:04 odesĂlatel Costa Shulyupin <costa.s...@redhat.com> napsal: > > timerlat_params and osnoise_params structures contain 17 identical > fields. > > Introduce a common_params structure and move those fields into it to > eliminate the code duplication and improve maintainability. > > Signed-off-by: Costa Shulyupin <costa.s...@redhat.com> > ---
Thank you for the patch. > +struct common_params { > + /* trace configuration */ > + char *cpus; > + cpu_set_t monitored_cpus; > + struct trace_events *events; > + int buffer_size; > + char *trace_output; > + > + /* Timing parameters */ > + int warmup; > + unsigned long long runtime; > + long long stop_us; > + long long stop_total_us; > + int sleep_time; > + int duration; > + > + /* Scheduling parameters */ > + int set_sched; > + struct sched_attr sched_param; > + int cgroup; > + char *cgroup_name; > + int hk_cpus; > + cpu_set_t hk_cpu_set; > +}; Some of these could be cleaned up further. E.g. "runtime" is actually only used by osnoise, even though it is declared in timerlat, too, and "period" is also used by timerlat, but it's called "timerlat_period_us" there. Nevertheless, that is directly not related to this patch, and tests pass. We can fix that later. Reviewed-by: Tomas Glozar <tglo...@redhat.com> Tomas