Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp977776ybi; Wed, 3 Jul 2019 07:30:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWU9nGaR8iE1NV/Z7KPbiBvv7jZNozP8JsldMNPObXLoNFIxJemNx8pUZM89szjgXoOqHo X-Received: by 2002:a17:902:3a5:: with SMTP id d34mr42589892pld.239.1562164241689; Wed, 03 Jul 2019 07:30:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562164241; cv=none; d=google.com; s=arc-20160816; b=IsZ7YxP0GZvvCILC95+x7c66OawPhSl2bgdWCJhvwTgcLjxoGQ+PZIP/K5qEhldaFt DzDA4zj1wlEeA3rBJsVhzeknTiy+BivqXGweF/GufCfAhQn5lgVvIdyvaTon+TqWbF9t vPP4rdf62lWt4i/iNGgCG6MnCCVXhNo/1rebV4mDk4zxZVPgFpogNB9RDcO31LkAMs9N k+ZM4S7SRceT+Lmf4LlX1ODz+0G62TW1/c5o6VBRJCSCCa39N0aaFPD62Vxr++5tSEjX 0ICq1pHMg5joPfKIMlNnv0SazXaJbVv0Ab/wfkEJnhmwAYSRA69JW3NyHDxLdbzx9Ghq Hjpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=c/leLdi/fVYAAwoPfr2Mcdi7QNNrCV2XaHN6pMFkevo=; b=XpleQkcJSTRuXF8xGmHONi8IuRJfaeVr0Csil8s6CDK0umNZNIdVznZ/1UCzM3qfvy mT+0TXYQBhXf0D6sGtCu+rIhTUi1/eNo5BE6fcB5Oa4HKSiewrEidkBiI4S6brENYj4X hlykPSAWGAk+k0gbflTAJ5YrwBQzl71IvWErdoT+Jv9r4ROrZCUDK2wzfjGafW5PEcSf 2Bw3pO0EKugyhOZ/I1AfIVXJSjpWDN1VgGhIC/SPmzwDj7ee9S/ZB6krPs93nmwkB7QR yqlrG1oU8Wnp/sYU85inkF4cJW6dvg852IwFWkgpPpzBFeFE7kGiaTWk+G4X2zWt9hxI PUgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019061801 header.b=yr9oFhIa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d39si2402572pla.371.2019.07.03.07.30.26; Wed, 03 Jul 2019 07:30:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zytor.com header.s=2019061801 header.b=yr9oFhIa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727119AbfGCO3u (ORCPT + 99 others); Wed, 3 Jul 2019 10:29:50 -0400 Received: from terminus.zytor.com ([198.137.202.136]:60191 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726640AbfGCO3u (ORCPT ); Wed, 3 Jul 2019 10:29:50 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x63ESWUK3326910 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 3 Jul 2019 07:28:32 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x63ESWUK3326910 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019061801; t=1562164113; bh=c/leLdi/fVYAAwoPfr2Mcdi7QNNrCV2XaHN6pMFkevo=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=yr9oFhIay7LGquixcjFT7ttsTGnh/MyerdORrqnSEfQ/VKUgOKvUb7jA0ou0S3kYS AawvhuHdI28hizNtlrINAZj7rQMXrmISrtd5zNFeqfwO1HupZmQvC4TXPMSLjTiolP gY6HSi8/M/DsbUD5jOIjcPUmFKZe0TEBYJqdpBw1TeVn6uBtZEl9uuHdAdKixjsnNW dM7ipXwhpkXwxTNNjkAsCN8Cayc6HWAoe4DVX6ZWZLEWZKUICSMa3AUhh8ut2FrO5T nzBaMPMV2eBsIapTTKPahGb9q07laVz8/oa/mA4zbI+MAA+ToqDYyxLd3hjUcsks2k OSGsFIy8c/doQ== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x63ESW3S3326906; Wed, 3 Jul 2019 07:28:32 -0700 Date: Wed, 3 Jul 2019 07:28:32 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Andi Kleen Message-ID: Cc: acme@redhat.com, tglx@linutronix.de, ak@linux.intel.com, mingo@kernel.org, jolsa@kernel.org, kan.liang@linux.intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org Reply-To: kan.liang@linux.intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org, acme@redhat.com, mingo@kernel.org, tglx@linutronix.de, ak@linux.intel.com, jolsa@kernel.org In-Reply-To: <20190624193711.35241-3-andi@firstfloor.org> References: <20190624193711.35241-3-andi@firstfloor.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf stat: Don't merge events in the same PMU Git-Commit-ID: 6c5f4e5cb35b4694dc035d91092d23f596ecd06a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 6c5f4e5cb35b4694dc035d91092d23f596ecd06a Gitweb: https://git.kernel.org/tip/6c5f4e5cb35b4694dc035d91092d23f596ecd06a Author: Andi Kleen AuthorDate: Mon, 24 Jun 2019 12:37:09 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 1 Jul 2019 22:50:41 -0300 perf stat: Don't merge events in the same PMU 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) Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Cc: Kan Liang Fixes: 430daf2dc7af ("perf stat: Collapse identically named events") Link: http://lkml.kernel.org/r/20190624193711.35241-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo --- 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 90df41169113..58df6a0dbb9f 100644 --- a/tools/perf/util/stat-display.c +++ b/tools/perf/util/stat-display.c @@ -554,7 +554,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);