Skip to contentSkip to conversation

perf report: Calling available function for stats printing

PATCH Applied Abhishek Dubey 3 participants 3 messages Jun 28, 2024 – Jul 3, 2024 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf report: Calling available function for stats printing

For printing dump_trace, just use existing stats_print() function.

---
 tools/perf/builtin-report.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/perf/builtin-report.c +1 -2
index 9718770facb5..6edc0d4ce6fb 100644
@@ -1089,8 +1089,7 @@ static int __cmd_report(struct report *rep)
 			perf_session__fprintf_dsos(session, stdout);
 
 		if (dump_trace) {
-			perf_session__fprintf_nr_events(session, stdout);
-			evlist__fprintf_nr_events(session->evlist, stdout);
+			stats_print(rep);
 			return 0;
 		}
 	}
Signature · 1 line
2.44.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Abhishek Dubey

For printing dump_trace, just use existing stats_print() function.

Thanks,
Ian

Quoted 21 lines
---
 tools/perf/builtin-report.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/perf/builtin-report.c +1 -3
index 9718770facb5..6edc0d4ce6fb 100644
@@ -1089,8 +1089,7 @@ static int __cmd_report(struct report *rep)
                        perf_session__fprintf_dsos(session, stdout);
 
                if (dump_trace) {
-                       perf_session__fprintf_nr_events(session, stdout);
-                       evlist__fprintf_nr_events(session->evlist, stdout);
+                       stats_print(rep);
                        return 0;
                }
        }
--

2.44.0

maintainer Applied
#2 lore raw
In reply to Abhishek Dubey
Quoted 4 lines · Abhishek Dubey

For printing dump_trace, just use existing stats_print() function.

Applied to perf-tools-next, thanks!

Best regards,
Namhyung