Re: [PATCH 4/4] perf vendor events amd: Add Zen 4 metrics
From: Ian Rogers
Date: Wed Dec 07 2022 - 12:35:25 EST
On Tue, Dec 6, 2022 at 10:58 PM Sandipan Das <sandipan.das@xxxxxxx> wrote:
>
> On 12/7/2022 11:35 AM, Ian Rogers wrote:
> > On Tue, Dec 6, 2022 at 9:32 PM Sandipan Das <sandipan.das@xxxxxxx> 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@xxxxxxx>
> >> ---
> >> .../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
Perhaps just drop it from the name :-) So,
dram_read_data_for_local_processor, etc.
Thanks,
Ian
> >> + "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
> >>
>