Skip to content

Commit 1fab146

Browse files
Andreas Zieglerrostedt
authored andcommitted
tools/tracing/rtla: osnoise_hist: display average with two-digit precision
Calculate average value in osnoise-hist summary with two-digit precision to avoid displaying too optimitic results. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Andreas Ziegler <[email protected]> Acked-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent fe137a4 commit 1fab146

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/tracing/rtla/src/osnoise_hist.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ osnoise_print_summary(struct osnoise_hist_params *params,
335335
continue;
336336

337337
if (data->hist[cpu].count)
338-
trace_seq_printf(trace->seq, "%9llu ",
339-
data->hist[cpu].sum_sample / data->hist[cpu].count);
338+
trace_seq_printf(trace->seq, "%9.2f ",
339+
((double) data->hist[cpu].sum_sample) / data->hist[cpu].count);
340340
else
341341
trace_seq_printf(trace->seq, " - ");
342342
}

0 commit comments

Comments
 (0)