so 11. 10. 2025 v 10:28 odesílatel Costa Shulyupin
<costa.shul@redhat.com> napsal:
>
> The long-term goal of this patch series is to reduce code duplication
> and unify argument display and parsing across all four tools.
>
> Costa Shulyupin (5):
> tools/rtla: Add fatal() and replace error handling pattern
> tools/rtla: Replace timerlat_top_usage("...") with fatal("...")
> tools/rtla: Replace timerlat_hist_usage("...") with fatal("...")
> tools/rtla: Replace osnoise_top_usage("...") with fatal("...")
> tools/rtla: Replace osnoise_hist_usage("...") with fatal("...")
It's perhaps unnecessary to do one commit per <tool>_usage() change.
On the other hand, separating changes like this helps backporting (not
much relevant here but relevant in other case).
>
> tools/tracing/rtla/src/osnoise_hist.c | 74 +++++++++--------------
> tools/tracing/rtla/src/osnoise_top.c | 68 ++++++++-------------
> tools/tracing/rtla/src/timerlat_hist.c | 82 ++++++++++----------------
> tools/tracing/rtla/src/timerlat_top.c | 76 +++++++++---------------
> tools/tracing/rtla/src/timerlat_u.c | 12 ++--
> tools/tracing/rtla/src/utils.c | 15 +++++
> tools/tracing/rtla/src/utils.h | 1 +
> 7 files changed, 128 insertions(+), 200 deletions(-)
>
> --
> 2.51.0
>
Otherwise, I agree. Especially the timerlat tools have so many
arguments that for a typical terminal size, you won't even see the
error message, as it will be pushed outside the view. I was not even
aware RTLA prints error messages in some of those cases, I thought it
just prints the help for some time.
For entire patchset:
Reviewed-by: Tomas Glozar <tglozar@redhat.com>
Tomas