Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp841257pxb; Wed, 29 Sep 2021 10:46:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSn+D2se/hgbvLMcmw4zIrNcn+dWFEW+AoRAOgnCbJ+w1/6jjFkUdlWYMcKWfOtk6RQPLl X-Received: by 2002:a50:8282:: with SMTP id 2mr1424321edg.98.1632937573181; Wed, 29 Sep 2021 10:46:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632937573; cv=none; d=google.com; s=arc-20160816; b=uTKLEmLb7SNnjVRUoyLWpXBnwkDg8CnxMsmT2Aj+h2XTfssQYoee5TjRHMdRKh3hC+ Q7HF5yeoKCX6fUJ5QCRLc5w4lWFGRGWL3U//q7ee8u4NaT9HOGlCyDX7TIu7L2/K3ipB S3a+PmEVvv1H5+QlcEG8NpqB0VHG3VQNwVgx0x1iSiYyqSdIUA2CoHGOBZyq+/lM8jxF LHycPku6OebUb3rDx17rwWTZSDEicU3iU/RfLDgWuXjN3PUjvBXMrQ97e6EyRpq3V+eW aEB8zyGmR17U8MoIlamrKfc8pZx6fpYk/eLmiyoDwsM1OOjQmtY/LKCKOSjoCUv3tkkp b+gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SWsMycBe7tfzydkEnAKirpATtD447kXbw9QFcEL5laY=; b=awYSfky5aBfwPQ3+NPhljvd/F0UnSM4ccHmp09dTDqq+GMsTcLFy7InrzwYGAQYQd1 mMM1E42TTYImhe1Vu+RTi7dV5RkCf2x0fhH5PAqQdMv8/AmRJyP6r8bag4ZyUGZ5Qd03 4jo/ko00pO4o5ywD5klptlZgKahhNlvzVGtAYWYSeDAHHZ1XiXgCj5EG7xHJcEF3qdTb YTAcRbrkF6yvZFgCjJ2D+Cc3P4Ay6h4OUxCIEFqVikh3gKkmyqKV8UvudbfPoslsBvr4 OfTzSLjctkfAtah7+8CzNU7GkQHku6WfnDpoU1Ciq2O/85MkRWYuCSo2WacQixLftr/+ ochA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pxwKyz8g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n8si866776edx.61.2021.09.29.10.45.48; Wed, 29 Sep 2021 10:46:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pxwKyz8g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343644AbhI2QxI (ORCPT + 99 others); Wed, 29 Sep 2021 12:53:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:48322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245753AbhI2QxH (ORCPT ); Wed, 29 Sep 2021 12:53:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 710FA6142A; Wed, 29 Sep 2021 16:51:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632934286; bh=emBPpoiw27wreF76TyqicFzW982o12rjgMyP5kO42rQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pxwKyz8gPmIzOLiLqCVhtLRuZhUFLFpuejkT2FSar8qtdo+EOspSUF6MFYjbP1cEU 9OrAuvMhv5RmFhegeZNdChTObQDdNTil49ty6Fpc9RTM6GnJ4M8VSeWBjUB1g/rnOm jaPuyn1fc2pEVGBoojpnBbKctDtxAVUGahfFa2ggmSM3XiZlgQCjNKNuxywJbdJgWm a2xNdAhonrkQeEG45Dg6sTEwrqIag4oVl69TI4lmNdzgF4srBD4lFiqaU0DM33LVeF wQK9rNgbNzyFG1UbBU83rWoTi+hAGJFw0TOlCoTW7eO8SVISPK+lCUr0Ly+3z+lmuc DeNksLN6t8dCg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 66EAD410A1; Wed, 29 Sep 2021 13:51:23 -0300 (-03) Date: Wed, 29 Sep 2021 13:51:23 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: John Garry , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-kernel@vger.kernel.org, Andi Kleen , Jin Yao , Paul Clarke , kajoljain , linux-perf-users@vger.kernel.org, Stephane Eranian , Sandeep Dasgupta Subject: Re: [PATCH v9 00/13] Don't compute events that won't be used in a metric. Message-ID: References: <20210923074616.674826-1-irogers@google.com> <00eb6280-fad0-66c4-b957-a4d27dffd0da@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Sep 29, 2021 at 09:09:24AM -0700, Ian Rogers escreveu: > On Wed, Sep 29, 2021 at 8:16 AM John Garry wrote: > > > > On 23/09/2021 08:46, Ian Rogers wrote: > > > For a metric like: > > > EVENT1 if #smt_on else EVENT2 > > > > > > currently EVENT1 and EVENT2 will be measured and then when the metric > > > is reported EVENT1 or EVENT2 will be printed depending on the value > > > from smt_on() during the expr parsing. Computing both events is > > > unnecessary and can lead to multiplexing as discussed in this thread: > > > https://lore.kernel.org/lkml/20201110100346.2527031-1-irogers@google.com/ > > > > > > This change modifies expression parsing so that constants are > > > considered when building the set of ids (events) and only events not > > > contributing to a constant value are measured. > > > > Based on some testing on my arm64 platform, no regression seen, so: > > > > Tested-by: John Garry > > Awesome, much thanks Jiri, John, Andi for the reviews and testing! Thanks, applied. - Arnaldo