From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751777AbdJXHjW (ORCPT ); Tue, 24 Oct 2017 03:39:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32874 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751381AbdJXHjV (ORCPT ); Tue, 24 Oct 2017 03:39:21 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2745AC050046 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jolsa@redhat.com Date: Tue, 24 Oct 2017 09:39:18 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 2/2] perf, tools, record: Fix -c/-F options for cpu event aliases Message-ID: <20171024073918.GB31772@krava> References: <20171020202755.21410-1-andi@firstfloor.org> <20171020202755.21410-2-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171020202755.21410-2-andi@firstfloor.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 24 Oct 2017 07:39:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 20, 2017 at 01:27:55PM -0700, Andi Kleen wrote: > From: Andi Kleen > > The Intel PMU event aliases have a implicit > period= specifier to set the default period. > > Unfortunately this breaks overriding these periods with -c or > -F, because the alias terms look like they are user specified > to the internal parser, and user specified event qualifiers override > the command line options. > > Track that they are coming from aliases by adding a > "weak" state to the term. Any weak terms don't override > command line options. > > I only did it for -c/-F for now, I think that's the > only case that's broken currently. > > Before: > > $ perf record -c 1000 -vv -e uops_issued.any > ... > { sample_period, sample_freq } 2000003 > > After: > > $ perf record -c 1000 -vv -e uops_issued.any > ... > { sample_period, sample_freq } 1000 > > Signed-off-by: Andi Kleen Acked-by: Jiri Olsa thanks, jirka