From: Crystal Wood <crwood@redhat.com>
To: John Kacur <jkacur@redhat.com>, Clark Williams <williams@redhat.com>
Cc: linux-rt-users@vger.kernel.org, Crystal Wood <crwood@redhat.com>
Subject: [PATCH 2/3] rt-tests: cyclicdeadline: Print the histogram regardless of quiet
Date: Mon, 22 Jan 2024 16:13:20 -0600 [thread overview]
Message-ID: <20240122221321.9545-2-crwood@redhat.com> (raw)
In-Reply-To: <20240122221321.9545-1-crwood@redhat.com>
The histogram printing code should not have been gated by !quiet,
even though other summary printing code is.
The non-histogram output also should not have been gated based on
the presence of the histogram.
Signed-off-by: Crystal Wood <crwood@redhat.com>
---
src/sched_deadline/cyclicdeadline.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
index b3155547b9bb..3cb8f714b788 100644
--- a/src/sched_deadline/cyclicdeadline.c
+++ b/src/sched_deadline/cyclicdeadline.c
@@ -1117,15 +1117,15 @@ static void loop(struct sched_data *sched_data, int nr_threads)
usleep(10000);
if (!quiet) {
printf("\033[%dB", nr_threads + 2);
- } else {
- if (histogram) {
- FILE *out = histfile ? histfile : stdout;
+ } else if (!histogram) {
+ for (i = 0; i < nr_threads; ++i)
+ print_stat(stdout, &sched_data[i], i, 0, 0);
+ }
- print_hist(out, sched_data, nr_threads);
- } else {
- for (i = 0; i < nr_threads; ++i)
- print_stat(stdout, &sched_data[i], i, 0, 0);
- }
+ if (histogram) {
+ FILE *out = histfile ? histfile : stdout;
+
+ print_hist(out, sched_data, nr_threads);
}
}
--
2.43.0
next prev parent reply other threads:[~2024-01-22 22:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 22:13 [PATCH 1/3] rt-tests: cyclics: Fix json segfault when not using histogram Crystal Wood
2024-01-22 22:13 ` Crystal Wood [this message]
2024-01-23 20:29 ` [PATCH 2/3] rt-tests: cyclicdeadline: Print the histogram regardless of quiet John Kacur
2024-01-22 22:13 ` [PATCH 3/3] rt-tests: cyclicdeadline: Remove dead "verbose" code in print_stat() Crystal Wood
2024-01-23 20:29 ` John Kacur
2024-01-23 20:28 ` [PATCH 1/3] rt-tests: cyclics: Fix json segfault when not using histogram John Kacur
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=20240122221321.9545-2-crwood@redhat.com \
--to=crwood@redhat.com \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=williams@redhat.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).