* [PATCH] perf trace: Simplify output of string literals in thread__dump_stats()
@ 2024-07-18 13:24 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2024-07-18 13:24 UTC (permalink / raw)
To: linux-perf-users, kernel-janitors, Adrian Hunter,
Alexander Shishkin, Arnaldo Carvalho de Melo, Ian Rogers,
Ingo Molnar, Jiri Olsa, Kan Liang, Mark Rutland, Namhyung Kim,
Peter Zijlstra
Cc: LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 18 Jul 2024 15:12:13 +0200
Combine four fprintf() calls so that the same text is printed
by a single function call.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
tools/perf/builtin-trace.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 8449f2beb54d..b96fc6c00e26 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -4238,11 +4238,11 @@ static size_t thread__dump_stats(struct thread_trace *ttrace,
if (syscall_stats == NULL)
return 0;
- printed += fprintf(fp, "\n");
-
- printed += fprintf(fp, " syscall calls errors total min avg max stddev\n");
- printed += fprintf(fp, " (msec) (msec) (msec) (msec) (%%)\n");
- printed += fprintf(fp, " --------------- -------- ------ -------- --------- --------- --------- ------\n");
+ printed += fprintf(fp,
+ "\n"
+ " syscall calls errors total min avg max stddev\n"
+ " (msec) (msec) (msec) (msec) (%%)\n"
+ " --------------- -------- ------ -------- --------- --------- --------- ------\n");
resort_rb__for_each_entry(nd, syscall_stats) {
struct syscall_stats *stats = syscall_stats_entry->stats;
--
2.45.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-07-18 13:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-18 13:24 [PATCH] perf trace: Simplify output of string literals in thread__dump_stats() Markus Elfring
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®