perf trace: Simplify output of string literals in thread__dump_stats()
Subsystems (2)
PATCH 1/1 perf trace: Simplify output of string literals in thread__dump_stats()
From: Markus Elfring <[email protected]>
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 <[email protected]>
--- tools/perf/builtin-trace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
tools/perf/builtin-trace.c +5 -5
@@ -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