From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752436AbdIRG6v (ORCPT ); Mon, 18 Sep 2017 02:58:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49858 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752405AbdIRG6s (ORCPT ); Mon, 18 Sep 2017 02:58:48 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DA56085376 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jolsa@redhat.com Date: Mon, 18 Sep 2017 08:58:45 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH] perf, tools: Fix adding multiple event groups Message-ID: <20170918065845.GA11683@krava> References: <20170914205735.18431-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170914205735.18431-1-andi@firstfloor.org> User-Agent: Mutt/1.9.0 (2017-09-02) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 18 Sep 2017 06:58:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 14, 2017 at 01:57:35PM -0700, Andi Kleen wrote: > From: Andi Kleen > > The -M metric group parser threw away the events of earlier > groups when multiple groups were specified. Fix this here > by not overwriting the string incorrectly. > > Now this works correctly: > > % perf stat -M Summary,SMT --metric-only -a sleep 1 > > Performance counter stats for 'system wide': > > Instructions CPI CLKS CPU_Utilization GFLOPs SMT_2T_Utilization SMT_2T_Utilization Kernel_Utilization CoreIPC CORE_CLKS > 900907376.0 2.7 2398954144.0 0.1 0.0 0.2 0.2 0.1 0.4 2080822855.5 > > while previously it would only show the SMT metrics. > > Signed-off-by: Andi Kleen Acked-by: Jiri Olsa thanks, jirka