Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2726501pxb; Tue, 19 Jan 2021 04:46:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiGQDPdyHjEVFQQPm1Hfs9d1f3KC1RXo2h3YSNuG4g2BTnMP612yDmRgowt9DYZkFoXIOL X-Received: by 2002:a17:906:1d0f:: with SMTP id n15mr2722582ejh.26.1611060366041; Tue, 19 Jan 2021 04:46:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611060366; cv=none; d=google.com; s=arc-20160816; b=bV5RDc2HSQZnCvOLngKc7xftsyVaeuetn9zdjq3QUmsJPf43tbNl1gJGQdMn84sOvK HtXfIL5OvaLLaRwyUaaMAYWEjHHWXoWWNsJq0LHwssUmK7xBwuQ7ySl66Z0y6cMvleTL K5AlWmbkRYbKbgIY4SS4rxKrT+Q4Vbtz/81f9A9FBCoMIz5UzP5+mQs2rdeAls9eyTUX N5QH7h1komfdRSxZKAU8RzDdQNcMok4gFFQlIVWtDghGnrGdF922kC2oG6Y9Ur329yWc WflNw1nj4q664ATWXJgE7VRlHs/16UphPshxs3MTI/HFbJuIK9pl1a5Xj8Oc8hJ88Cgc 3dlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=9KCuZINb9KzLfm4LlaS2VtvQSj1NHLyCui665zPNbtM=; b=eiAi4LIMUQOQgUh3LHuD7qpGpdrGrS/+/iM4wJmyw03RETtE6ZXEaWaJOZ4CviV6cm PbYTpKtPC3/J1VqxRGdcBy9azEm4OXZaJsalMUIYVwpFVzhMOHRVU/ZGSmD0gnbNvcft WFYWTGPC1QYF93TYH5JjvWxCfoUpdk9mZDI4R/OVvjAcLNPqWbbpaKPWoXGEK/8vBalx /nrq2EkxsUCov+A6rDr1xYw+5rO/6SBhH1LYo23WkzLOKXVAo0SrOPeeKq8jC3ZUFInH 4II6qWnA9Xa19T8t0ZeRmOTT+sBKAqX6k4EuICM/TZ2jz15MYbv75g6ci4oFQAnQCYV8 hntQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o16si151839ejr.715.2021.01.19.04.45.37; Tue, 19 Jan 2021 04:46:06 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391819AbhASMJz (ORCPT + 99 others); Tue, 19 Jan 2021 07:09:55 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:2375 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392308AbhASMEZ (ORCPT ); Tue, 19 Jan 2021 07:04:25 -0500 Received: from fraeml710-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4DKnJR0qhSz67dKH; Tue, 19 Jan 2021 19:59:35 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml710-chm.china.huawei.com (10.206.15.59) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 19 Jan 2021 13:03:41 +0100 Received: from [10.47.10.61] (10.47.10.61) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 19 Jan 2021 12:03:40 +0000 Subject: Re: [PATCH] perf metricgroup: Fix system PMU metrics To: Joakim Zhang , "peterz@infradead.org" , "mingo@redhat.com" , "acme@kernel.org" , "mark.rutland@arm.com" , "alexander.shishkin@linux.intel.com" , "jolsa@redhat.com" , "namhyung@kernel.org" , "irogers@google.com" , "kjain@linux.ibm.com" CC: "linux-kernel@vger.kernel.org" , "linuxarm@openeuler.org" References: <1611050655-44020-1-git-send-email-john.garry@huawei.com> From: John Garry Message-ID: Date: Tue, 19 Jan 2021 12:02:26 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.10.61] X-ClientProxiedBy: lhreml742-chm.china.huawei.com (10.201.108.192) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/01/2021 10:56, Joakim Zhang wrote: > root@imx8mmevk:~# ./perf stat -a -I 1000 -M imx8mm_ddr_read.all,imx8mm_ddr_write .all > # time counts unit events > 1.001446500 40832 imx8mm_ddr.read_cycles # 638.0 KB imx8mm_ddr_read.all > 1.001446500 16973 imx8mm_ddr.write_cycles # 265.2 KB imx8mm_ddr_write.all > 2.003150250 28836 imx8mm_ddr.read_cycles # 450.6 KB imx8mm_ddr_read.all > 2.003150250 6705 imx8mm_ddr.write_cycles # 104.8 KB imx8mm_ddr_write.all > > For this issue, Tested-by: Joakim Zhang > > Hi John, > > It seems have other issue compared to 5.10 kernel after switching to this framework, below metric can't work. > "MetricExpr": "(( imx8_ddr0@read\\-cycles@ + imx8_ddr0@write\\-cycles@ ) * 4 * 4 / duration_time) / (750 * 1000000 * 4 * 4)" > After change to: > "MetricExpr": "(( imx8mm_ddr.read_cycles + imx8mm_ddr.write_cycles ) * 4 * 4 / duration_time) / (750 * 1000000 * 4 * 4)", > OK, I can have a look. So is there anything else, apart from this, which doesn't work now? Thanks, john