summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/src/timerlat_top.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-05-29 20:59:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-05-29 20:59:52 -0700
commit472c5f736b54c476c9bfaa0258c4c07fc6ddeea4 (patch)
tree2186f6e68b7ffd790b2eb2fa25a2fa4e0ffddc03 /tools/tracing/rtla/src/timerlat_top.c
parente0797d3b91de75b6c95b4a0e0649ebd4aac1d9d1 (diff)
parent8020361d51eea5145402e450d91b083bccdcd874 (diff)
Merge tag 'trace-tools-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull tracing tools updates from Steven Rostedt: - Set distinctive value for failed tests When running "make check" that performs tests on rtla the failure is checked by examining the output. Instead have the tool return an error status if it exceeds the threadhold. - Define __NR_sched_setattr for LoongArch Define __NR_sched_setattr to allow this to build for LoongArch. - Define _GNU_SOURCE for timerlat_bpf.c Due to modifications of struct sched_attr in utils.h when _GNU_SOURCE is not defined, this can cause errors for timerlat_bpf_init() and breakage in BPF sample collection mode. * tag 'trace-tools-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: rtla: Define _GNU_SOURCE in timerlat_bpf.c rtla: Define __NR_sched_setattr for LoongArch rtla: Set distinctive exit value for failed tests
Diffstat (limited to 'tools/tracing/rtla/src/timerlat_top.c')
-rw-r--r--tools/tracing/rtla/src/timerlat_top.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c
index 79cb6f28967f..7365e08fe986 100644
--- a/tools/tracing/rtla/src/timerlat_top.c
+++ b/tools/tracing/rtla/src/timerlat_top.c
@@ -985,12 +985,12 @@ int timerlat_top_main(int argc, char *argv[])
struct timerlat_params *params;
struct osnoise_tool *record = NULL;
struct timerlat_u_params params_u;
+ enum result return_value = ERROR;
struct osnoise_tool *top = NULL;
struct osnoise_tool *aa = NULL;
struct trace_instance *trace;
int dma_latency_fd = -1;
pthread_t timerlat_u;
- int return_value = 1;
char *max_lat;
int retval;
int nr_cpus, i;
@@ -1197,7 +1197,7 @@ int timerlat_top_main(int argc, char *argv[])
timerlat_print_stats(params, top);
- return_value = 0;
+ return_value = PASSED;
if (osnoise_trace_is_off(top, record) && !stop_tracing) {
printf("rtla timerlat hit stop tracing\n");
@@ -1207,6 +1207,7 @@ int timerlat_top_main(int argc, char *argv[])
save_trace_to_file(record ? record->trace.inst : NULL,
params->trace_output);
+ return_value = FAILED;
} else if (params->aa_only) {
/*
* If the trace did not stop with --aa-only, at least print the