linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] perf stat: Don't display zero tool counts
@ 2023-08-01 20:54 Ian Rogers
  2023-08-03 20:38 ` Andi Kleen
  2023-08-03 20:54 ` Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 8+ messages in thread
From: Ian Rogers @ 2023-08-01 20:54 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Kan Liang, Athira Rajeev, Claire Jensen,
	linux-perf-users, linux-kernel, Andi Kleen
  Cc: Ian Rogers

Skip zero counts for tool events.

Reported-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/stat-display.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
index 7329b3340f88..d45d5dcb0e2b 100644
--- a/tools/perf/util/stat-display.c
+++ b/tools/perf/util/stat-display.c
@@ -931,6 +931,11 @@ static bool should_skip_zero_counter(struct perf_stat_config *config,
 	 */
 	if (config->aggr_mode == AGGR_THREAD && config->system_wide)
 		return true;
+
+	/* Tool events have the software PMU but are only gathered on 1. */
+	if (evsel__is_tool(counter))
+		return true;
+
 	/*
 	 * Skip value 0 when it's an uncore event and the given aggr id
 	 * does not belong to the PMU cpumask.
-- 
2.41.0.585.gd2178a4bd4-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-08 20:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 20:54 [PATCH v1] perf stat: Don't display zero tool counts Ian Rogers
2023-08-03 20:38 ` Andi Kleen
2023-08-03 20:54 ` Arnaldo Carvalho de Melo
2023-08-07 14:54   ` Andi Kleen
2023-08-07 19:43     ` Arnaldo Carvalho de Melo
2023-08-07 19:57       ` Arnaldo Carvalho de Melo
2023-08-08 17:38         ` Andi Kleen
2023-08-08 19:50           ` Arnaldo Carvalho de Melo

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 NNTP newsgroup(s).