aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuzuki K Poulose <[email protected]>2021-07-28 10:12:19 +0100
committerArnaldo Carvalho de Melo <[email protected]>2021-09-03 08:29:55 -0300
commitc68b421d8ebe15b509144a6ec5a08ff7089a7dd5 (patch)
treecc7fab117437d1f63f07cb7b2725d9fa70e572f5
parent538d9c1829eddf375436c52604f82ff3f53c6690 (diff)
perf session: Report collisions in AUX records
Just like the other flags in the AUX records, report a summary of the Collisions if there were any. Signed-off-by: Suzuki Poulouse <[email protected]> Reviewed-by: Leo Yan <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mike Leach <[email protected]> Cc: Suzuki Poulouse <[email protected]> Cc: [email protected] Cc: [email protected] LPU-Reference: [email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/events_stats.h1
-rw-r--r--tools/perf/util/session.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/events_stats.h b/tools/perf/util/events_stats.h
index 3480bafd414b..1b0006092265 100644
--- a/tools/perf/util/events_stats.h
+++ b/tools/perf/util/events_stats.h
@@ -30,6 +30,7 @@ struct events_stats {
u64 total_lost_samples;
u64 total_aux_lost;
u64 total_aux_partial;
+ u64 total_aux_collision;
u64 total_invalid_chains;
u32 nr_events[PERF_RECORD_HEADER_MAX];
u32 nr_lost_warned;
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index d2e27ff96030..069c2cfdd3be 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1541,6 +1541,8 @@ static int machines__deliver_event(struct machines *machines,
evlist->stats.total_aux_lost += 1;
if (event->aux.flags & PERF_AUX_FLAG_PARTIAL)
evlist->stats.total_aux_partial += 1;
+ if (event->aux.flags & PERF_AUX_FLAG_COLLISION)
+ evlist->stats.total_aux_collision += 1;
}
return tool->aux(tool, event, sample, machine);
case PERF_RECORD_ITRACE_START:
@@ -1896,6 +1898,13 @@ static void perf_session__warn_about_errors(const struct perf_session *session)
"");
}
+ if (session->tool->aux == perf_event__process_aux &&
+ stats->total_aux_collision != 0) {
+ ui__warning("AUX data detected collision %" PRIu64 " times out of %u!\n\n",
+ stats->total_aux_collision,
+ stats->nr_events[PERF_RECORD_AUX]);
+ }
+
if (stats->nr_unknown_events != 0) {
ui__warning("Found %u unknown events!\n\n"
"Is this an older tool processing a perf.data "