Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1055230pxa; Wed, 12 Aug 2020 22:11:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybqV2vyvIsNwrv2MZUmJ7lMx08qXf8b3LKes2oYWgxKSoC49nxGB2xRzy1PDYIl7qOZJx0 X-Received: by 2002:a17:906:1b04:: with SMTP id o4mr3334337ejg.332.1597295480514; Wed, 12 Aug 2020 22:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597295480; cv=none; d=google.com; s=arc-20160816; b=RRHOHu0JM5sX+SxIh76Cz7vGFMeXJL3hogoC8NAxNOiOnZb/vZ1kGgcSglKWKXNBBV OzglQnUCax8MvEMuCiIBPvARXWxHyuZ24pFV7WGhvZNcdx4XlG2h9OWs34DMFNKEkIEs VbHGx8gP8UGO+N9RsiM95BIjgkFhBH4kMhttKUMRbykr4GW22N6HA+nvgG5HWQ1wEN2m XyOAJrteU3qNpsCcOmp/L2nYBSOdyPGMC7bsHydXgqjd2ovDpHsArwPqL56XFwd5JtsS r7JMMhF7kMg+dxUmk2k20LbHpQJsY1TFT+TWkzebYpmMSFUTYslDmJGTOOBKj9Ym8Hbv o3Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=Dai41gmKj4siYJs+o1BAOHfDCnT94s3bFhd4IIWU1dw=; b=dMDS2ZK3pVDGCuwXIWC6kfiQaK5XxeMtKpQyIf3pOCd114N9nyaP3ehJvp9bta7xYh hDzakE9vnsaluwgCELxp3CGmlhiy82cMAJw0/2opKlvPUP7xmaMIcsdM46TTeG3wW40N uprn06A0m38Kz7GIkWzomHmg7mA/Lvbqj9Q9OslObt9l+OqhNBIBsZ4JVkFKXqDJppCb FkVUMpGPs0SYnyIhomRRzc8CMLmuTrjJZryz63ev+44bANb7rpQp2UH9ePH7qeQHYNg4 c7atsWTQYduLJlpktGnKDYhkeKJvfDTxmYAslM5ud3/DvpmmkyLKLkzsPMnoKnx+SRZ7 z5ew== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be24si2568440edb.287.2020.08.12.22.10.57; Wed, 12 Aug 2020 22:11:20 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726102AbgHMFKD (ORCPT + 99 others); Thu, 13 Aug 2020 01:10:03 -0400 Received: from mga14.intel.com ([192.55.52.115]:29664 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725949AbgHMFKC (ORCPT ); Thu, 13 Aug 2020 01:10:02 -0400 IronPort-SDR: xsCJkt/aB6L36/8H9GSRVmhT+64sAFXOlGYoPds4G34A4lTVhFEHE9O0OWmWcifr7tf+8jIauT vaI0mTrS1Y6g== X-IronPort-AV: E=McAfee;i="6000,8403,9711"; a="153382616" X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="153382616" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 22:10:01 -0700 IronPort-SDR: piAiiNtZ08YVQ9/zVmG4fdTu9qJTNw2tgwLmbSDi1eOQtOuVESiP2QBqNveViVCSGTbwrH3fac ZxXCbulBF+Kg== X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="470088631" Received: from yjin15-mobl1.ccr.corp.intel.com (HELO [10.238.5.239]) ([10.238.5.239]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 22:09:59 -0700 Subject: Re: [PATCH] perf parse-events: Set exclude_guest for user-space counting To: Arnaldo Carvalho de Melo Cc: jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, like.xu@linux.intel.com References: <20200812065953.22143-1-yao.jin@linux.intel.com> <20200812121504.GE13995@kernel.org> <20200812125526.GM13995@kernel.org> From: "Jin, Yao" Message-ID: Date: Thu, 13 Aug 2020 13:09:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200812125526.GM13995@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo, On 8/12/2020 8:55 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Aug 12, 2020 at 09:15:04AM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Wed, Aug 12, 2020 at 02:59:53PM +0800, Jin Yao escreveu: >>> Currently if we run 'perf record -e cycles:u', exclude_guest is 0. >>> >>> But it doesn't make sense that we request for user-space counting >>> but we also get the guest report. >>> >>> To keep perf semantics consistent and clear, this patch sets >>> exclude_guest for user-space counting. >> >> Applied, and also added this, that you should consider doing in the >> future (modulo the "Committer testing:" header :) ): >> >> Committer testing: >> >> Before: >> >> # perf record -e cycles:u >> ^C[ perf record: Woken up 1 times to write data ] >> [ perf record: Captured and wrote 1.231 MB perf.data (91 samples) ] >> # >> # perf evlist -v >> cycles:u: size: 120, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|ID|CPU|PERIOD, read_format: ID, disabled: 1, inherit: 1, exclude_kernel: 1, exclude_hv: 1, freq: 1, sample_id_all: 1 >> >> # >> >> After: >> >> # perf record -e cycles:u >> ^C[ perf record: Woken up 1 times to write data ] >> [ perf record: Captured and wrote 1.263 MB perf.data (403 samples) ] >> # >> # perf evlist -v >> cycles:u: size: 120, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|ID|CPU|PERIOD, read_format: ID, disabled: 1, inherit: 1, exclude_kernel: 1, exclude_hv: 1, freq: 1, sample_id_all: 1, exclude_guest: 1 >> # > > Also, please run 'perf test', as this will require changes to some > expected perf_event_attr setups: > > [root@quaco ~]# perf test "event definition" > 6: Parse event definition strings : FAILED! > [root@quaco ~]# > > - Arnaldo > Sorry for the perf test failure! I will post v2 to fix this issue. Thanks Jin Yao