From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967153AbdJRJ0V (ORCPT ); Wed, 18 Oct 2017 05:26:21 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:8938 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965409AbdJRJ0S (ORCPT ); Wed, 18 Oct 2017 05:26:18 -0400 Subject: Re: [PATCH] perf vendor events arm64: Add hip08 implementation defined PMU core events To: Will Deacon , Shaokun Zhang , Ganapatrao Kulkarni References: <1508223699-39274-1-git-send-email-zhangshaokun@hisilicon.com> <20171017125926.GE14051@arm.com> CC: , , , Peter Zijlstra , "Ingo Molnar" , Arnaldo Carvalho de Melo , Alexander Shishkin From: John Garry Message-ID: Date: Wed, 18 Oct 2017 10:25:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20171017125926.GE14051@arm.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.238] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.59E71E35.0093,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: c57947254eea56ddc0daa984864de9d4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/10/2017 13:59, Will Deacon wrote: > Hi Shaokun, > > Thanks for the patch. One comment below. > > On Tue, Oct 17, 2017 at 03:01:39PM +0800, Shaokun Zhang wrote: >> This is a short list of useful implementation defined PMU events of >> hip08, other supported events are not listed in this JSON file. >> >> This patch is dependent on Cavium's patch-v9 (Add support for >> ThunderX2 pmu events using json files), Link: >> https://www.spinics.net/lists/arm-kernel/msg611895.html >> >> Signed-off-by: Shaokun Zhang >> Cc: Peter Zijlstra >> Cc: Ingo Molnar >> Cc: Arnaldo Carvalho de Melo >> Cc: Alexander Shishkin >> Cc: Will Deacon >> Cc: Ganapatrao Kulkarni >> Cc: John Garry >> --- >> .../arch/arm64/hisilicon/hip08-imp-def.json | 176 +++++++++++++++++++++ >> tools/perf/pmu-events/arch/arm64/mapfile.csv | 1 + >> 2 files changed, 177 insertions(+) >> create mode 100644 tools/perf/pmu-events/arch/arm64/hisilicon/hip08-imp-def.json >> >> diff --git a/tools/perf/pmu-events/arch/arm64/hisilicon/hip08-imp-def.json b/tools/perf/pmu-events/arch/arm64/hisilicon/hip08-imp-def.json >> new file mode 100644 >> index 0000000..6bb31da >> --- /dev/null >> +++ b/tools/perf/pmu-events/arch/arm64/hisilicon/hip08-imp-def.json >> @@ -0,0 +1,176 @@ >> +[ >> + { >> + "PublicDescription": "Attributable Level 1 data cache access, read", >> + "EventCode": "0x40", >> + "EventName": "L1D_CACHE_RD", >> + "BriefDescription": "L1D cache access, read", >> + }, >> + { >> + "PublicDescription": "Attributable Level 1 data cache access, write", >> + "EventCode": "0x41", >> + "EventName": "L1D_CACHE_WR", >> + "BriefDescription": "L1D cache access, write", >> + }, > > So these are the same as the events in cavium/thunderx2-imp-def.json and > should be factored out. In fact, ARM recommends event numbers for 0x40-0xBF, > so the best thing would be to have those defined in their own file, then > have a way for the various CPU-specific .json files to pick and chose the > events they need from there. Right, this seems reasonable. Just need to check on feasible. In terms of coordinating this work, shall we do it? Will arm64+ThunderX support be accepted as is? Thanks, John > > Will > > . >