From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932331AbdHVIpV (ORCPT ); Tue, 22 Aug 2017 04:45:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35498 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932132AbdHVIpU (ORCPT ); Tue, 22 Aug 2017 04:45:20 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 732D6C05683F Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jolsa@redhat.com Date: Tue, 22 Aug 2017 10:45: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 v2 08/19] perf, tools: Expression parser enhancements for metrics Message-ID: <20170822084518.GG23985@krava> References: <20170811232634.30465-1-andi@firstfloor.org> <20170811232634.30465-8-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170811232634.30465-8-andi@firstfloor.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 22 Aug 2017 08:45:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 11, 2017 at 04:26:23PM -0700, Andi Kleen wrote: > From: Andi Kleen > > Enhance the expression parser for more complex metric formulas. > > - Support python style IF ELSE operators > - Add an #SMT_On magic variable for formulas that depend on the SMT > status. > > Example: 4 *( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles > > - Support MIN/MAX operations > > Example: min(1 , IDQ.MITE_UOPS / ( UPI * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) ) > > This is useful to fix up problems caused by multiplexing. > > - Support | & ^ operators > - Minor cleanups and fixes > - Support an \ escape for operators. This allows to specify event names > like c2-residency > - Support @ as an alternative for / to be able to specify pmus without > conflicts with operators (like msr/tsc/ as msr@tsc@) > > Example: (cstate_core@c3\\-residency@ / msr@tsc@) * 100 > > Signed-off-by: Andi Kleen Acked-by: Jiri Olsa thanks, jirka