From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753883AbdARMou (ORCPT ); Wed, 18 Jan 2017 07:44:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57230 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751894AbdARMot (ORCPT ); Wed, 18 Jan 2017 07:44:49 -0500 Date: Wed, 18 Jan 2017 13:44:46 +0100 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, Andi Kleen Subject: Re: [PATCH 07/11] perf, tools: Collapse identically named events in perf stat Message-ID: <20170118124446.GE11946@krava> References: <20170103150833.6694-1-andi@firstfloor.org> <20170103150833.6694-8-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170103150833.6694-8-andi@firstfloor.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 18 Jan 2017 12:44:50 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 03, 2017 at 07:08:29AM -0800, Andi Kleen wrote: > From: Andi Kleen > > The uncore PMU has a lot of duplicated PMUs for different subsystems. > When expanding an uncore alias we usually end up with a large > number of identically named aliases, which makes perf stat > output difficult to read. > > Automatically sum them up in perf stat, unless --no-merge is specified. > > This can be default because only the uncores generally have duplicated > aliases. Other PMUs have unique names. > > Before: > > % perf stat --no-merge -a -e unc_c_llc_lookup.any sleep 1 > > Performance counter stats for 'system wide': > > 694,976 Bytes unc_c_llc_lookup.any > 706,304 Bytes unc_c_llc_lookup.any > 956,608 Bytes unc_c_llc_lookup.any > 782,720 Bytes unc_c_llc_lookup.any > 605,696 Bytes unc_c_llc_lookup.any > 442,816 Bytes unc_c_llc_lookup.any > 659,328 Bytes unc_c_llc_lookup.any > 509,312 Bytes unc_c_llc_lookup.any > 263,936 Bytes unc_c_llc_lookup.any > 592,448 Bytes unc_c_llc_lookup.any > 672,448 Bytes unc_c_llc_lookup.any > 608,640 Bytes unc_c_llc_lookup.any > 641,024 Bytes unc_c_llc_lookup.any > 856,896 Bytes unc_c_llc_lookup.any > 808,832 Bytes unc_c_llc_lookup.any > 684,864 Bytes unc_c_llc_lookup.any > 710,464 Bytes unc_c_llc_lookup.any > 538,304 Bytes unc_c_llc_lookup.any > > 1.002577660 seconds time elapsed > > After: > > % perf stat -a -e unc_c_llc_lookup.any sleep 1 > > Performance counter stats for 'system wide': > > 2,685,120 Bytes unc_c_llc_lookup.any > > 1.002648032 seconds time elapsed if one of them is not supported, we get wrong output: [jolsa@krava perf]$ sudo ./perf stat --no-merge -a -e clockticks sleep 1 Performance counter stats for 'system wide': clockticks 4,925,158 clockticks 1.000982200 seconds time elapsed [jolsa@krava perf]$ sudo ./perf stat -a -e clockticks sleep 1 Performance counter stats for 'system wide': clockticks 1.000850195 seconds time elapsed jirka