mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sandipan Das <sandipan.das@amd.com>
To: Ian Rogers <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	acme@kernel.org, peterz@infradead.org, mingo@redhat.com,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	jolsa@kernel.org, namhyung@kernel.org, eranian@google.com,
	jhladky@redhat.com, ravi.bangoria@amd.com,
	ananth.narayan@amd.com
Subject: Re: [PATCH 4/4] perf vendor events amd: Add Zen 4 metrics
Date: Wed, 7 Dec 2022 12:28:02 +0530	[thread overview]
Message-ID: <6675c596-eeb4-3347-ec85-2bd67b970973@amd.com> (raw)
In-Reply-To: <CAP-5=fUS37Xqi1x2ZDj48saFu-g5dCvwqg8Vm0DF1V0vuq4tXw@mail.gmail.com>

On 12/7/2022 11:35 AM, Ian Rogers wrote:
> On Tue, Dec 6, 2022 at 9:32 PM Sandipan Das <sandipan.das@amd.com> wrote:
>>
>> Add metrics taken from Section 2.1.15.2 "Performance Measurement" in
>> the Processor Programming Reference (PPR) for AMD Family 19h Model 11h
>> Revision B1 processors.
>>
>> The recommended metrics are sourced from Table 27 "Guidance for Common
>> Performance Statistics with Complex Event Selects".
>>
>> The pipeline utilization metrics are sourced from Table 28 "Guidance
>> for Pipeline Utilization Analysis Statistics". These are new to Zen 4
>> processors and useful for finding performance bottlenecks by analyzing
>> activity at different stages of the pipeline. Metric groups have been
>> added for Level 1 and Level 2 analysis.
>>
>> Signed-off-by: Sandipan Das <sandipan.das@amd.com>
>> ---
>>  .../pmu-events/arch/x86/amdzen4/pipeline.json |  98 +++++
>>  .../arch/x86/amdzen4/recommended.json         | 334 ++++++++++++++++++
>>  2 files changed, 432 insertions(+)
>>  create mode 100644 tools/perf/pmu-events/arch/x86/amdzen4/pipeline.json
>>  create mode 100644 tools/perf/pmu-events/arch/x86/amdzen4/recommended.json
>>
<snip>
>> +  {
>> +    "MetricName": "dram_read_data_bytes_for_local_processor",
> 
> nit: Is "bytes" redundant in the name here? It may even be confusing
> given the units.
> 

Agreed. I can replace "bytes" with "mbytes" or "megabytes" for these bandwidth metrics.

- Sandipan

>> +    "BriefDescription": "DRAM read data bytes for local processor.",
>> +    "MetricExpr": "local_processor_read_data_beats_cs0 + local_processor_read_data_beats_cs1 + local_processor_read_data_beats_cs2 + local_processor_read_data_beats_cs3 + local_processor_read_data_beats_cs4 + local_processor_read_data_beats_cs5 + local_processor_read_data_beats_cs6 + local_processor_read_data_beats_cs7 + local_processor_read_data_beats_cs8 + local_processor_read_data_beats_cs9 + local_processor_read_data_beats_cs10 + local_processor_read_data_beats_cs11",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "6.103515625e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "dram_write_data_bytes_for_local_processor",
>> +    "BriefDescription": "DRAM write data bytes for local processor.",
>> +    "MetricExpr": "local_processor_write_data_beats_cs0 + local_processor_write_data_beats_cs1 + local_processor_write_data_beats_cs2 + local_processor_write_data_beats_cs3 + local_processor_write_data_beats_cs4 + local_processor_write_data_beats_cs5 + local_processor_write_data_beats_cs6 + local_processor_write_data_beats_cs7 + local_processor_write_data_beats_cs8 + local_processor_write_data_beats_cs9 + local_processor_write_data_beats_cs10 + local_processor_write_data_beats_cs11",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "6.103515625e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "dram_read_data_bytes_for_remote_processor",
>> +    "BriefDescription": "DRAM read data bytes for remote processor.",
>> +    "MetricExpr": "remote_processor_read_data_beats_cs0 + remote_processor_read_data_beats_cs1 + remote_processor_read_data_beats_cs2 + remote_processor_read_data_beats_cs3 + remote_processor_read_data_beats_cs4 + remote_processor_read_data_beats_cs5 + remote_processor_read_data_beats_cs6 + remote_processor_read_data_beats_cs7 + remote_processor_read_data_beats_cs8 + remote_processor_read_data_beats_cs9 + remote_processor_read_data_beats_cs10 + remote_processor_read_data_beats_cs11",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "6.103515625e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "dram_write_data_bytes_for_remote_processor",
>> +    "BriefDescription": "DRAM write data bytes for remote processor.",
>> +    "MetricExpr": "remote_processor_write_data_beats_cs0 + remote_processor_write_data_beats_cs1 + remote_processor_write_data_beats_cs2 + remote_processor_write_data_beats_cs3 + remote_processor_write_data_beats_cs4 + remote_processor_write_data_beats_cs5 + remote_processor_write_data_beats_cs6 + remote_processor_write_data_beats_cs7 + remote_processor_write_data_beats_cs8 + remote_processor_write_data_beats_cs9 + remote_processor_write_data_beats_cs10 + remote_processor_write_data_beats_cs11",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "6.103515625e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "local_socket_upstream_dma_read_data_bytes",
>> +    "BriefDescription": "Local socket upstream DMA read data bytes.",
>> +    "MetricExpr": "local_socket_upstream_read_beats_iom0 + local_socket_upstream_read_beats_iom1 + local_socket_upstream_read_beats_iom2 + local_socket_upstream_read_beats_iom3",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "6.103515625e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "local_socket_upstream_dma_write_data_bytes",
>> +    "BriefDescription": "Local socket upstream DMA write data bytes.",
>> +    "MetricExpr": "local_socket_upstream_write_beats_iom0 + local_socket_upstream_write_beats_iom1 + local_socket_upstream_write_beats_iom2 + local_socket_upstream_write_beats_iom3",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "6.103515625e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "remote_socket_upstream_dma_read_data_bytes",
>> +    "BriefDescription": "Remote socket upstream DMA read data bytes.",
>> +    "MetricExpr": "remote_socket_upstream_read_beats_iom0 + remote_socket_upstream_read_beats_iom1 + remote_socket_upstream_read_beats_iom2 + remote_socket_upstream_read_beats_iom3",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "6.103515625e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "remote_socket_upstream_dma_write_data_bytes",
>> +    "BriefDescription": "Remote socket upstream DMA write data bytes.",
>> +    "MetricExpr": "remote_socket_upstream_write_beats_iom0 + remote_socket_upstream_write_beats_iom1 + remote_socket_upstream_write_beats_iom2 + remote_socket_upstream_write_beats_iom3",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "6.103515625e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "local_socket_inbound_data_bytes_to_cpu",
>> +    "BriefDescription": "Local socket inbound data bytes to the CPU (e.g. read data).",
>> +    "MetricExpr": "local_socket_inf0_inbound_data_beats_ccm0 + local_socket_inf1_inbound_data_beats_ccm0 + local_socket_inf0_inbound_data_beats_ccm1 + local_socket_inf1_inbound_data_beats_ccm1 + local_socket_inf0_inbound_data_beats_ccm2 + local_socket_inf1_inbound_data_beats_ccm2 + local_socket_inf0_inbound_data_beats_ccm3 + local_socket_inf1_inbound_data_beats_ccm3 + local_socket_inf0_inbound_data_beats_ccm4 + local_socket_inf1_inbound_data_beats_ccm4 + local_socket_inf0_inbound_data_beats_ccm5 + local_socket_inf1_inbound_data_beats_ccm5 + local_socket_inf0_inbound_data_beats_ccm6 + local_socket_inf1_inbound_data_beats_ccm6 + local_socket_inf0_inbound_data_beats_ccm7 + local_socket_inf1_inbound_data_beats_ccm7",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "3.0517578125e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "local_socket_outbound_data_bytes_from_cpu",
>> +    "BriefDescription": "Local socket outbound data bytes from the CPU (e.g. write data).",
>> +    "MetricExpr": "local_socket_inf0_outbound_data_beats_ccm0 + local_socket_inf1_outbound_data_beats_ccm0 + local_socket_inf0_outbound_data_beats_ccm1 + local_socket_inf1_outbound_data_beats_ccm1 + local_socket_inf0_outbound_data_beats_ccm2 + local_socket_inf1_outbound_data_beats_ccm2 + local_socket_inf0_outbound_data_beats_ccm3 + local_socket_inf1_outbound_data_beats_ccm3 + local_socket_inf0_outbound_data_beats_ccm4 + local_socket_inf1_outbound_data_beats_ccm4 + local_socket_inf0_outbound_data_beats_ccm5 + local_socket_inf1_outbound_data_beats_ccm5 + local_socket_inf0_outbound_data_beats_ccm6 + local_socket_inf1_outbound_data_beats_ccm6 + local_socket_inf0_outbound_data_beats_ccm7 + local_socket_inf1_outbound_data_beats_ccm7",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "6.103515625e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "remote_socket_inbound_data_bytes_to_cpu",
>> +    "BriefDescription": "Remote socket inbound data bytes to the CPU (e.g. read data).",
>> +    "MetricExpr": "remote_socket_inf0_inbound_data_beats_ccm0 + remote_socket_inf1_inbound_data_beats_ccm0 + remote_socket_inf0_inbound_data_beats_ccm1 + remote_socket_inf1_inbound_data_beats_ccm1 + remote_socket_inf0_inbound_data_beats_ccm2 + remote_socket_inf1_inbound_data_beats_ccm2 + remote_socket_inf0_inbound_data_beats_ccm3 + remote_socket_inf1_inbound_data_beats_ccm3 + remote_socket_inf0_inbound_data_beats_ccm4 + remote_socket_inf1_inbound_data_beats_ccm4 + remote_socket_inf0_inbound_data_beats_ccm5 + remote_socket_inf1_inbound_data_beats_ccm5 + remote_socket_inf0_inbound_data_beats_ccm6 + remote_socket_inf1_inbound_data_beats_ccm6 + remote_socket_inf0_inbound_data_beats_ccm7 + remote_socket_inf1_inbound_data_beats_ccm7",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "3.0517578125e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "remote_socket_outbound_data_bytes_from_cpu",
>> +    "BriefDescription": "Remote socket outbound data bytes from the CPU (e.g. write data).",
>> +    "MetricExpr": "remote_socket_inf0_outbound_data_beats_ccm0 + remote_socket_inf1_outbound_data_beats_ccm0 + remote_socket_inf0_outbound_data_beats_ccm1 + remote_socket_inf1_outbound_data_beats_ccm1 + remote_socket_inf0_outbound_data_beats_ccm2 + remote_socket_inf1_outbound_data_beats_ccm2 + remote_socket_inf0_outbound_data_beats_ccm3 + remote_socket_inf1_outbound_data_beats_ccm3 + remote_socket_inf0_outbound_data_beats_ccm4 + remote_socket_inf1_outbound_data_beats_ccm4 + remote_socket_inf0_outbound_data_beats_ccm5 + remote_socket_inf1_outbound_data_beats_ccm5 + remote_socket_inf0_outbound_data_beats_ccm6 + remote_socket_inf1_outbound_data_beats_ccm6 + remote_socket_inf0_outbound_data_beats_ccm7 + remote_socket_inf1_outbound_data_beats_ccm7",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "6.103515625e-5MiB"
>> +  },
>> +  {
>> +    "MetricName": "local_socket_outbound_data_bytes_from_all_links",
>> +    "BriefDescription": "Outbound data bytes from all links (local socket).",
>> +    "MetricExpr": "local_socket_outbound_data_beats_link0 + local_socket_outbound_data_beats_link1 + local_socket_outbound_data_beats_link2 + local_socket_outbound_data_beats_link3 + local_socket_outbound_data_beats_link4 + local_socket_outbound_data_beats_link5 + local_socket_outbound_data_beats_link6 + local_socket_outbound_data_beats_link7",
>> +    "MetricGroup": "data_fabric",
>> +    "PerPkg": "1",
>> +    "ScaleUnit": "6.103515625e-5MiB"
>> +  }
>> +]
>> --
>> 2.34.1
>>


  reply	other threads:[~2022-12-07  6:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07  5:30 [PATCH 0/4] perf vendor events amd: Add Zen 4 events and metrics Sandipan Das
2022-12-07  5:30 ` [PATCH 1/4] perf vendor events amd: Add Zen 4 mapping Sandipan Das
2022-12-07  5:30 ` [PATCH 2/4] perf vendor events amd: Add Zen 4 core events Sandipan Das
2022-12-07  5:30 ` [PATCH 3/4] perf vendor events amd: Add Zen 4 uncore events Sandipan Das
2022-12-07  5:30 ` [PATCH 4/4] perf vendor events amd: Add Zen 4 metrics Sandipan Das
2022-12-07  6:05   ` Ian Rogers
2022-12-07  6:58     ` Sandipan Das [this message]
2022-12-07 17:35       ` Ian Rogers
2022-12-07 17:44   ` Ian Rogers
2022-12-13  9:45     ` Sandipan Das
2022-12-07  6:06 ` [PATCH 0/4] perf vendor events amd: Add Zen 4 events and metrics Ian Rogers
2022-12-07  6:53   ` Sandipan Das

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=6675c596-eeb4-3347-ec85-2bd67b970973@amd.com \
    --to=sandipan.das@amd.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ananth.narayan@amd.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jhladky@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@amd.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

all inboxes | Powered by JetHome®