linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: William Cohen <wcohen@redhat.com>
To: John Garry <john.garry@huawei.com>,
	Ganapatrao Kulkarni <gklkml16@gmail.com>,
	Jiri Olsa <jolsa@redhat.com>
Cc: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>,
	ak@linux.intel.com, Peter Zijlstra <peterz@infradead.org>,
	Will Deacon <will.deacon@arm.com>, Linuxarm <linuxarm@huawei.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	linux-kernel@vger.kernel.org,
	Zhangshaokun <zhangshaokun@hisilicon.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	namhyung@kernel.org, linux-arm-kernel@lists.infradead.org,
	Jayachandran.Nair@cavium.com
Subject: Re: [PATCH v2 00/11] perf events patches for improved ARM64 support
Date: Mon, 5 Mar 2018 10:39:33 -0500	[thread overview]
Message-ID: <6564ebca-b87d-f307-72ce-e1c541800e42@redhat.com> (raw)
In-Reply-To: <599637d9-0b78-9edb-d459-515f76aca9fe@huawei.com>

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

  reply	other threads:[~2018-03-05 15:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 16:05 [PATCH v2 00/11] perf events patches for improved ARM64 support John Garry
2018-02-23 16:05 ` [PATCH v2 01/11] perf vendor events: drop incomplete multiple mapfile support John Garry
2018-02-23 16:05 ` [PATCH v2 02/11] perf vendor events: fix error code in json_events() John Garry
2018-02-23 16:05 ` [PATCH v2 03/11] perf vendor events: drop support for unused topic directories John Garry
2018-02-23 16:05 ` [PATCH v2 04/11] perf vendor events: add support for pmu events vendor subdirectory John Garry
2018-02-23 16:05 ` [PATCH v2 05/11] perf vendor events arm64: Relocate ThunderX2 JSON to cavium subdirectory John Garry
2018-02-23 16:05 ` [PATCH v2 06/11] perf vendor events arm64: Relocate Cortex A53 JSONs to arm subdirectory John Garry
2018-02-23 16:05 ` [PATCH v2 07/11] perf vendor events: add support for arch standard events John Garry
2018-02-27  9:48   ` Jiri Olsa
2018-02-27  9:58     ` John Garry
2018-02-23 16:05 ` [PATCH v2 08/11] perf vendor events arm64: add armv8-recommended.json John Garry
2018-02-23 16:05 ` [PATCH v2 09/11] perf vendor events arm64: fixup ThunderX2 to use recommended events John Garry
2018-02-23 16:05 ` [PATCH v2 10/11] perf vendor events arm64: fixup A53 " John Garry
2018-02-23 16:05 ` [PATCH v2 11/11] perf vendor events arm64: add HiSilicon hip08 JSON file John Garry
2018-02-27  9:50 ` [PATCH v2 00/11] perf events patches for improved ARM64 support Jiri Olsa
2018-02-27 10:03   ` John Garry
2018-03-02  8:24   ` John Garry
2018-03-02  8:45     ` Ganapatrao Kulkarni
2018-03-02 16:05     ` William Cohen
2018-03-02 16:35       ` Ganapatrao Kulkarni
2018-03-02 16:40         ` John Garry
2018-03-02 23:38         ` William Cohen
2018-03-05 11:24           ` John Garry
2018-03-05 15:39             ` William Cohen [this message]
2018-03-05 16:28               ` John Garry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6564ebca-b87d-f307-72ce-e1c541800e42@redhat.com \
    --to=wcohen@redhat.com \
    --cc=Jayachandran.Nair@cavium.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ganapatrao.kulkarni@cavium.com \
    --cc=gklkml16@gmail.com \
    --cc=john.garry@huawei.com \
    --cc=jolsa@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.com \
    --cc=zhangshaokun@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).