Skip to contentSkip to conversation

perf vendor events intel: Fix broadwellde tma_info_system_dram_bw_use metric

PATCH Superseded Ian Rogers 2 participants 3 messages Sep 26, 2023 perf events

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH 1/1 perf vendor events intel: Fix broadwellde tma_info_system_dram_bw_use metric

Broadwell-de has a consumer core and server uncore. The uncore_arb PMU isn't present and the broadwellx style cbox PMU should be used instead. Fix the tma_info_system_dram_bw_use metric to use the server metric rather than client.

The associated converter script fix is in:
https://github.com/intel/perfmon/pull/111

Fixes 7d124303d620 ("perf vendor events intel: Update broadwell variant events/metrics")
---
 tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json +1 -1
index 8fc62b8f667d..d0ef46c9bb61 100644
@@ -652,7 +652,7 @@
     },
     {
         "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]",
-        "MetricExpr": "64 * (arb@event\\=0x81\\,umask\\=0x1@ + arb@event\\=0x84\\,umask\\=0x1@) / 1e6 / duration_time / 1e3",
+        "MetricExpr": "64 * (UNC_M_CAS_COUNT.RD + UNC_M_CAS_COUNT.WR) / 1e9 / duration_time",
         "MetricGroup": "HPC;Mem;MemoryBW;SoC;tma_issueBW",
         "MetricName": "tma_info_system_dram_bw_use",
         "PublicDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]. Related metrics: tma_fb_full, tma_mem_bandwidth, tma_sq_full"
Signature · 1 line
2.42.0.515.g380fc7ccd1-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Ian Rogers

Broadwell-de has a consumer core and server uncore.

Besides this one, compared with the bdx-metrics.json, there is one uncore metrics missed in the bdwde-metrics.json, uncore_frequency.

Quoted 9 lines

The uncore_arb PMU
isn't present and the broadwellx style cbox PMU should be used instead. Fix the tma_info_system_dram_bw_use metric to use the server metric rather than client.>
The associated converter script fix is in:
https://github.com/intel/perfmon/pull/111

Fixes 7d124303d620 ("perf vendor events intel: Update broadwell variant events/metrics")

Thanks,
Kan

Quoted 17 lines
---
 tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json +1 -1
index 8fc62b8f667d..d0ef46c9bb61 100644
@@ -652,7 +652,7 @@
     },
     {
         "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]",
-        "MetricExpr": "64 * (arb@event\\=0x81\\,umask\\=0x1@ + arb@event\\=0x84\\,umask\\=0x1@) / 1e6 / duration_time / 1e3",
+        "MetricExpr": "64 * (UNC_M_CAS_COUNT.RD + UNC_M_CAS_COUNT.WR) / 1e9 / duration_time",
         "MetricGroup": "HPC;Mem;MemoryBW;SoC;tma_issueBW",
         "MetricName": "tma_info_system_dram_bw_use",
         "PublicDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]. Related metrics: tma_fb_full, tma_mem_bandwidth, tma_sq_full"
author reviewer
#2 lore raw
Quoted 8 lines · Kan
Quoted 1 line · Ian Rogers

Broadwell-de has a consumer core and server uncore.

Besides this one, compared with the bdx-metrics.json, there is one uncore metrics missed in the bdwde-metrics.json, uncore_frequency.

You're right and I knew it related to this:
https://github.com/intel/perfmon/blob/cddf6ebe4cc23b71a5d8bf7fa007b3e2cb706c2e/scripts/create_perf_json.py#L760
On Tigerlake UNC_CLOCK.SOCKET works fine so maybe the exclusion was an error:
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/arch/x86/tigerlake/uncore-other.json?h=perf-tools-next
On BDW-DE if I do the same trick as UNC_ARB and use the BDX resolution then that works too. So I'll fix that and send out a v2.

Thanks,
Ian

Quoted 31 lines
Quoted 9 lines

The uncore_arb PMU
isn't present and the broadwellx style cbox PMU should be used instead. Fix the tma_info_system_dram_bw_use metric to use the server metric rather than client.>
The associated converter script fix is in:
https://github.com/intel/perfmon/pull/111

Fixes 7d124303d620 ("perf vendor events intel: Update broadwell variant events/metrics")

Thanks,
Kan

Quoted 17 lines
---
 tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json +1 -1
index 8fc62b8f667d..d0ef46c9bb61 100644
@@ -652,7 +652,7 @@
     },
     {
         "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]",
-        "MetricExpr": "64 * (arb@event\\=0x81\\,umask\\=0x1@ + arb@event\\=0x84\\,umask\\=0x1@) / 1e6 / duration_time / 1e3",
+        "MetricExpr": "64 * (UNC_M_CAS_COUNT.RD + UNC_M_CAS_COUNT.WR) / 1e9 / duration_time",
         "MetricGroup": "HPC;Mem;MemoryBW;SoC;tma_issueBW",
         "MetricName": "tma_info_system_dram_bw_use",
         "PublicDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]. Related metrics: tma_fb_full, tma_mem_bandwidth, tma_sq_full"