From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Andreas Ziegler <br015@umbiko.net>,
Daniel Bristot de Oliveira <bristot@kernel.org>
Subject: [for-next][PATCH 3/8] tools/tracing/rtla: osnoise_hist: display average with two-digit precision
Date: Sat, 18 Feb 2023 15:18:24 -0500 [thread overview]
Message-ID: <20230218201932.404609629@goodmis.org> (raw)
In-Reply-To: <20230218201821.938318263@goodmis.org>
From: Andreas Ziegler <br015@umbiko.net>
Calculate average value in osnoise-hist summary with two-digit
precision to avoid displaying too optimitic results.
Link: https://lkml.kernel.org/r/20230103103400.275566-3-br015@umbiko.net
Signed-off-by: Andreas Ziegler <br015@umbiko.net>
Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
tools/tracing/rtla/src/osnoise_hist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/tracing/rtla/src/osnoise_hist.c b/tools/tracing/rtla/src/osnoise_hist.c
index fe34452fc4ec..13e1233690bb 100644
--- a/tools/tracing/rtla/src/osnoise_hist.c
+++ b/tools/tracing/rtla/src/osnoise_hist.c
@@ -335,8 +335,8 @@ osnoise_print_summary(struct osnoise_hist_params *params,
continue;
if (data->hist[cpu].count)
- trace_seq_printf(trace->seq, "%9llu ",
- data->hist[cpu].sum_sample / data->hist[cpu].count);
+ trace_seq_printf(trace->seq, "%9.2f ",
+ ((double) data->hist[cpu].sum_sample) / data->hist[cpu].count);
else
trace_seq_printf(trace->seq, " - ");
}
--
2.39.1
next prev parent reply other threads:[~2023-02-18 20:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-18 20:18 [for-next][PATCH 0/8] tracing/tools: Updates for 6.3 Steven Rostedt
2023-02-18 20:18 ` [for-next][PATCH 1/8] tools/rv: Remove unneeded semicolon Steven Rostedt
2023-02-18 20:18 ` [for-next][PATCH 2/8] tools/tracing/rtla: osnoise_hist: use total duration for average calculation Steven Rostedt
2023-02-18 20:18 ` Steven Rostedt [this message]
2023-02-18 20:18 ` [for-next][PATCH 4/8] rtla/timerlat: Add auto-analysis core Steven Rostedt
2023-02-18 20:18 ` [for-next][PATCH 5/8] rtla/timerlat: Add auto-analysis support to timerlat top Steven Rostedt
2023-02-18 20:18 ` [for-next][PATCH 6/8] Documentation/rtla: Add timerlat-top auto-analysis options Steven Rostedt
2023-02-18 20:18 ` [for-next][PATCH 7/8] rtla: Add hwnoise tool Steven Rostedt
2023-02-18 20:18 ` [for-next][PATCH 8/8] Documentation/rtla: Add hwnoise man page Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230218201932.404609629@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=br015@umbiko.net \
--cc=bristot@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®