]> git.ipfire.org Git - thirdparty/linux.git/commit
tools/rtla: Add fatal() and replace error handling pattern
authorCosta Shulyupin <costa.shul@redhat.com>
Sat, 11 Oct 2025 08:27:34 +0000 (11:27 +0300)
committerTomas Glozar <tglozar@redhat.com>
Fri, 21 Nov 2025 09:30:27 +0000 (10:30 +0100)
commit8cbb25db81544f0bfc05c037ad61d3e70d031f88
tree852822f8db3500137639de14d131ee1043be5c60
parent34c170ae5c3036ef879567a37409a2859e327342
tools/rtla: Add fatal() and replace error handling pattern

The code contains some technical debt in error handling,
which complicates the consolidation of duplicated code.

Introduce an fatal() function to replace the common pattern of
err_msg() followed by exit(EXIT_FAILURE), reducing the length of an
already long function.

Further patches using fatal() follow.

Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
Reviewed-by: Tomas Glozar <tglozar@redhat.com>
Link: https://lore.kernel.org/r/20251011082738.173670-2-costa.shul@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
tools/tracing/rtla/src/osnoise_hist.c
tools/tracing/rtla/src/osnoise_top.c
tools/tracing/rtla/src/timerlat_hist.c
tools/tracing/rtla/src/timerlat_top.c
tools/tracing/rtla/src/timerlat_u.c
tools/tracing/rtla/src/utils.c
tools/tracing/rtla/src/utils.h