Skip to contentSkip to conversation

perf vendor events intel: Fix broadwellde tma_info_system_dram_bw_use metric

PATCH Applied Ian Rogers 3 participants 9 messages Sep 26, 2023 – Oct 30, 2023 perf events

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH v2 1/3 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
author reviewer
#1 lore raw

PATCH v2 2/3 perf vendor events intel: Add broadwellde two metrics

Add tma_info_system_socket_clks and uncore_freq metrics that require a broadwellx style uncore event for UNC_CLOCK.

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

Fixes 7d124303d620 ("perf vendor events intel: Update broadwell variant events/metrics")
---
 .../arch/x86/broadwellde/bdwde-metrics.json          | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json +12 -0
index d0ef46c9bb61..e1f55fcfa0d0 100644
@@ -48,6 +48,12 @@
         "MetricName": "C7_Pkg_Residency",
         "ScaleUnit": "100%"
     },
+    {
+        "BriefDescription": "Uncore frequency per die [GHZ]",
+        "MetricExpr": "tma_info_system_socket_clks / #num_dies / duration_time / 1e9",
+        "MetricGroup": "SoC",
+        "MetricName": "UNCORE_FREQ"
+    },
     {
         "BriefDescription": "Percentage of cycles spent in System Management Interrupts.",
         "MetricExpr": "((msr@aperf@ - cycles) / msr@aperf@ if msr@smi@ > 0 else 0)",
@@ -690,6 +696,12 @@
         "MetricGroup": "SMT",
         "MetricName": "tma_info_system_smt_2t_utilization"
     },
+    {
+        "BriefDescription": "Socket actual clocks when any core is active on that socket",
+        "MetricExpr": "cbox_0@event\\=0x0@",
+        "MetricGroup": "SoC",
+        "MetricName": "tma_info_system_socket_clks"
+    },
     {
         "BriefDescription": "Average Frequency Utilization relative nominal frequency",
         "MetricExpr": "tma_info_thread_clks / CPU_CLK_UNHALTED.REF_TSC",
Signature · 1 line
2.42.0.515.g380fc7ccd1-goog
author reviewer
#2 lore raw

PATCH v2 3/3 perf vendor events intel: Add tigerlake two metrics

In reply to Ian Rogers

Add tma_info_system_socket_clks and uncore_freq metrics.

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

---
 .../pmu-events/arch/x86/tigerlake/tgl-metrics.json   | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tools/perf/pmu-events/arch/x86/tigerlake/tgl-metrics.json +12 -0
index fab084e1bc69..820d85c2933b 100644
@@ -62,6 +62,12 @@
         "MetricName": "C9_Pkg_Residency",
         "ScaleUnit": "100%"
     },
+    {
+        "BriefDescription": "Uncore frequency per die [GHZ]",
+        "MetricExpr": "tma_info_system_socket_clks / #num_dies / duration_time / 1e9",
+        "MetricGroup": "SoC",
+        "MetricName": "UNCORE_FREQ"
+    },
     {
         "BriefDescription": "Percentage of cycles spent in System Management Interrupts.",
         "MetricExpr": "((msr@aperf@ - cycles) / msr@aperf@ if msr@smi@ > 0 else 0)",
@@ -1026,6 +1032,12 @@
         "MetricGroup": "SMT",
         "MetricName": "tma_info_system_smt_2t_utilization"
     },
+    {
+        "BriefDescription": "Socket actual clocks when any core is active on that socket",
+        "MetricExpr": "UNC_CLOCK.SOCKET",
+        "MetricGroup": "SoC",
+        "MetricName": "tma_info_system_socket_clks"
+    },
     {
         "BriefDescription": "Average Frequency Utilization relative nominal frequency",
         "MetricExpr": "tma_info_thread_clks / CPU_CLK_UNHALTED.REF_TSC",
Signature · 1 line
2.42.0.515.g380fc7ccd1-goog
Reviewed-by on v2 1/3
#3 lore raw
In reply to Ian Rogers
Quoted 11 lines · Ian Rogers

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")

---

Thanks Ian. The whole patch series looks good to me.

Thanks,
Kan

Quoted 16 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
#4 lore raw
Quoted 12 lines · Kan
Quoted 8 lines · Ian Rogers

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

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

---

Thanks Ian. The whole patch series looks good to me.

Would be good to pick this up in perf-tools-next.

Thanks,
Ian

Quoted 19 lines

Thanks,
Kan

Quoted 16 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
#5 lore raw
Quoted 18 lines · Ian Rogers
Quoted 16 lines · Kan
Quoted 11 lines · Ian Rogers

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")

---

Quoted 8 lines
Quoted 3 lines

Thanks Ian. The whole patch series looks good to me.

Would be good to pick this up in perf-tools-next.

Thanks,
Ian

Ping.

Thanks,
Ian

Quoted 19 lines
Quoted 19 lines

Thanks,
Kan

Quoted 16 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
#6 lore raw
Quoted 22 lines · Ian Rogers
Quoted 20 lines · Ian Rogers
Quoted 18 lines · Kan
Quoted 11 lines · Ian Rogers

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")

---

Thanks Ian. The whole patch series looks good to me.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Would be good to pick this up in perf-tools-next.

Thanks,
Ian

Ping.

Thanks Namhyung for picking this up. There were two other patches in the v2 patch set that Kan reviewed:
https://lore.kernel.org/all/[email protected]/
that I don't see in perf-tools-next.

Ian

Quoted 22 lines

Thanks,
Ian

Quoted 19 lines
Quoted 19 lines

Thanks,
Kan

Quoted 16 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"
maintainer
#7 lore raw

Hi Ian,

Quoted 31 lines · Ian Rogers
Quoted 29 lines · Ian Rogers
Quoted 26 lines · Ian Rogers
Quoted 12 lines · Kan
Quoted 8 lines · Ian Rogers

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

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

---

Thanks Ian. The whole patch series looks good to me.

Would be good to pick this up in perf-tools-next.

Thanks,
Ian

Quoted 6 lines
Quoted 1 line

Ping.

Thanks Namhyung for picking this up. There were two other patches in the v2 patch set that Kan reviewed:
https://lore.kernel.org/all/[email protected]/
that I don't see in perf-tools-next.

Sorry about that. I'll take care of them too.

Thanks,
Namhyung

maintainer Applied
#8 lore raw
Quoted 35 lines · Namhyung Kim

Hi Ian,

Quoted 31 lines · Ian Rogers
Quoted 29 lines · Ian Rogers
Quoted 26 lines · Ian Rogers
Quoted 12 lines · Kan
Quoted 8 lines · Ian Rogers

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

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

---

Thanks Ian. The whole patch series looks good to me.

Would be good to pick this up in perf-tools-next.

Thanks,
Ian

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Ping.

Thanks Namhyung for picking this up. There were two other patches in the v2 patch set that Kan reviewed:
https://lore.kernel.org/all/[email protected]/
that I don't see in perf-tools-next.

Sorry about that. I'll take care of them too.

Applied to perf-tools-next, thanks!