Received: by 10.223.185.116 with SMTP id b49csp2720178wrg; Mon, 5 Mar 2018 07:40:48 -0800 (PST) X-Google-Smtp-Source: AG47ELsvtrNItpHFKlWYisdlXPFS38vwnCsdbz1igFd5XvawB11Eg5zYSgT+vcZqDOUI0cGXE40w X-Received: by 10.99.100.196 with SMTP id y187mr12644832pgb.362.1520264448440; Mon, 05 Mar 2018 07:40:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520264448; cv=none; d=google.com; s=arc-20160816; b=OgbunnBHEPjyCOiLTysDuNzUCkLXT9oHFc5qz1TBEfpZOhaG7hSGC9FSECnnZiyVOe xInO8LGrDeqP/ovNrOARtSmQ+wCyFBU/RsiPTUifkwqX3UV/mk/GX0Dfrtnz27K2N2qS IwfmOENCgxSoHPhxT5FetPKcsu4yB4ujBu8mvNIpYhj0PNjvcUo1oriespVKGVNv7n2l qK3rZ1L6gDZkPxdz/PRf1tlauUe8dGA5rmpT1WDv+iimYiXVMfUGqlwuiubDaiJ32JZR TLNyW0zcKjfi+0QU493qTLSYzwTwn+L93EOZez74jS9gNnXX9cui9vZRUafo4m+jJ5jp HNIw== 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:arc-authentication-results; bh=gQMHoO0wWJl6miB4q4FSHx5g3lSBEySREvcgjZLSxwg=; b=hzp2WEnTVRFb6vBRG+kc1MlrMMkydCMtAjEWCvfqLB0BytCXUtdU7EqMC3yf8lVt// Pjpuu7ONJeYhQWd6TV+sFkL5cjZvnSfQam2gbFWk4cXbdVKP+4+/SaB7Q4jndabJvyUr iBVZNKVtLNfLFFLH7pXvcJWeBUfQAQ9dTDwK2HPDZPCdRL6YZ16J2NkL54rCJmXpe7RT 4ba0fI++n+8Dq2yq+K7JqOV8I3nVLtOmBomLVgwsBSb3m68RVV82h0KlQIGlyO8d6CEp gS3xg0MdoHMJ+0YjxKNIO3S2KmtX+Uest+yp5A7PKADk6+SA4zAduS/5eFnuhJNyzRqK Cqdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 76si6398635pfo.248.2018.03.05.07.40.34; Mon, 05 Mar 2018 07:40:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752372AbeCEPji (ORCPT + 99 others); Mon, 5 Mar 2018 10:39:38 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51132 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751395AbeCEPjf (ORCPT ); Mon, 5 Mar 2018 10:39:35 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C2CC642EF134; Mon, 5 Mar 2018 15:39:34 +0000 (UTC) Received: from [10.13.129.233] (dhcp129-233.rdu.redhat.com [10.13.129.233]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03640AFD74; Mon, 5 Mar 2018 15:39:34 +0000 (UTC) Subject: Re: [PATCH v2 00/11] perf events patches for improved ARM64 support To: John Garry , Ganapatrao Kulkarni , Jiri Olsa Cc: Ganapatrao Kulkarni , ak@linux.intel.com, Peter Zijlstra , Will Deacon , Linuxarm , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Zhangshaokun , Alexander Shishkin , Ingo Molnar , namhyung@kernel.org, linux-arm-kernel@lists.infradead.org, Jayachandran.Nair@cavium.com References: <1519401932-205051-1-git-send-email-john.garry@huawei.com> <20180227095028.GG21033@krava> <6250a69e-71ab-5119-cc3f-7e2661aa8c0b@huawei.com> <8f72afe5-8620-bdd3-3a54-87a22f77c3d4@redhat.com> <599637d9-0b78-9edb-d459-515f76aca9fe@huawei.com> From: William Cohen Message-ID: <6564ebca-b87d-f307-72ce-e1c541800e42@redhat.com> Date: Mon, 5 Mar 2018 10:39:33 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <599637d9-0b78-9edb-d459-515f76aca9fe@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-MW Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 15:39:34 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 15:39:34 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'wcohen@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/05/2018 06:24 AM, John Garry wrote: >>> I am seeing issue(log below) with this patchset on our platfrom. >>> i have tried using your v2 branch [1] >>> >>> root@borg-1>perf_acme>> ./perf --version >>> perf version 4.16.rc1.g087f7ca >>> root@borg-1>perf_acme>> ./perf stat -e bus_access_rd sleep 1 >>> >>>  Performance counter stats for 'sleep 1': >>> >>>             23,099      bus_access_rd >>> >>>        1.000708516 seconds time elapsed >>> >>> root@borg-1>perf_acme>> cd - >>> /ganapat/perf/linux-hisi/tools/perf >>> root@borg-1>perf>> ./perf --version >>> perf version 4.16.rc1.gcb5a74 >>> root@borg-1>perf>> ./perf stat -e bus_access_rd sleep 1 >>> >>>  Performance counter stats for 'sleep 1': >>> >>>                  0      bus_access_rd >>> >>>        1.000709162 seconds time elapsed >>> >>> root@borg-1>perf>> >>> >>> >>> [1] https://github.com/hisilicon/linux-hisi.git >>> >> Hi, > > Hi Will Cohen, Ganapatrao, > >> >> I took a slightly different tack and compared the output of "perf list --details" to see if the event numbers numbers were the same.  For the common events borrowed from the armv8-recommended.json all the events are 0 for the cortex a53.  That would explain why the bus_access_rd above were counts were different if it was counting the SW_INCR event instead of bus_access_rd. >> > > Thanks for this. I see the problem. At the end I missed bringing across something from v1. Easily fixed. > >> Why not key the matching of common events off the "EventName" rather than "EventCode"? The EventName would be more descriptive. Then the json files could eliminate the "BriefDescription" and just have the EventName with nothing else for each event.  This would further reduce the amount of redundant fields between the specific implementations and the common set. >> > > I did consider it and it could work. But it all depends on whether the "EventName" only is always readable/descriptive enough in the JSON, without requiring the "BriefDescription". The "EventName" can be rather succinct for any arch. And we need to guarantee that the "EventName" is unique. > > Here's a sample: > [ >     { >         "ArchStdEvent": "L1D_CACHE_RD", >     }, >     { >         "ArchStdEvent": "L1D_CACHE_WR", >     }, > > vs. > > [ >     { >         "ArchStdEvent": "0x40", >         "BriefDescription": "L1D cache access, read" >     }, >     { >         "ArchStdEvent": "0x41", >         "BriefDescription": "L1D cache access, write" >     }, > > > Opinion? Hi John, The "ArchStdEvent" version is more concise by avoiding the duplication of "BriefDescription" field and possible differences in "BriefDescription" due to typos. Would it make easier for people coding up descriptions for specific processors? It would depend on how the documentation is written up. For the armv8 documentation in "D5.10.3 Common event numbers" list the event mnemonic in "Table D5-8 PMU common architectural and microarchitectural event numbers" so just using the event names seems like it would be pretty clear. For different Intel ia64 microarchitecture implementations there are different event coding to implement the same event name. Not sure how would handle the universe of different families of ia64 processor implementations. Is the armv8-common.json being used as a template that fills out the fields of the json elements that match up an entry in the armv8-common.json? Or does it only use the information from the armv8-common.json. If the code treated the armv8-common.json as default values, then if something differs in the architecture specific entry it could overwrite the default value from the template. -Will Cohen