lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 24 Jun 2019 12:37:09 -0700
From:   Andi Kleen <andi@...stfloor.org>
To:     acme@...nel.org
Cc:     jolsa@...nel.org, kan.liang@...el.com,
        linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH v1 2/4] perf stat: Don't merge events in the same PMU

From: Andi Kleen <ak@...ux.intel.com>

Event merging is mainly to collapse similar events in lots of
different duplicated PMUs.

It can break metric displaying. It's possible for two metrics
to have the same event, and when the two events happen in a row
the second wouldn't be displayed.  This would also not
show the second metric.

To avoid this don't merge events in the same PMU. This makes
sense, if we have multiple events in the same PMU there is
likely some reason for it (e.g. using multiple groups)
and we better not merge them.

While in theory it would be possible to construct metrics
that have events with the same name in different PMU no
current metrics have this problem.

This is the fix for perf stat -M UPI,IPC (needs also
another bug fix to completely work)

Fixes: 430daf2dc7af ("perf stat: Collapse identically ...")
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
 tools/perf/util/stat-display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
index a6b9de3e83fc..91d62fd6607f 100644
--- a/tools/perf/util/stat-display.c
+++ b/tools/perf/util/stat-display.c
@@ -555,7 +555,8 @@ static void collect_all_aliases(struct perf_stat_config *config, struct perf_evs
 		    alias->scale != counter->scale ||
 		    alias->cgrp != counter->cgrp ||
 		    strcmp(alias->unit, counter->unit) ||
-		    perf_evsel__is_clock(alias) != perf_evsel__is_clock(counter))
+		    perf_evsel__is_clock(alias) != perf_evsel__is_clock(counter) ||
+		    !strcmp(alias->pmu_name, counter->pmu_name))
 			break;
 		alias->merged_stat = true;
 		cb(config, alias, data, false);
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ