Skip to contentSkip to conversation

perf vendor events intel: Update free running alderlake events

PATCH Superseded Ian Rogers 2 participants 7 messages Apr 6, 2023 – Apr 7, 2023 perf events

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH 1/5 perf vendor events intel: Update free running alderlake events

Fix the PMU name, event code and umask.

These updates were generated by:
https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py
with this PR:
https://github.com/intel/perfmon/pull/66

---
 .../arch/x86/alderlake/uncore-memory.json        | 16 ++++++++++++----
 .../arch/x86/alderlaken/uncore-memory.json       | 16 ++++++++++++----
 2 files changed, 24 insertions(+), 8 deletions(-)
tools/perf/pmu-events/arch/x86/alderlake/uncore-memory.json +12 -4
index 2ccd9cf96957..ea25bb411f89 100644
@@ -1,29 +1,37 @@
 [
     {
         "BriefDescription": "Counts every 64B read  request entering the Memory Controller 0 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read request entering the Memory Controller 0 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 0 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B read request entering the Memory Controller 1 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read entering the Memory Controller 1 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 1 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "ACT command for a read request sent to DRAM",
tools/perf/pmu-events/arch/x86/alderlaken/uncore-memory.json +12 -4
index 2ccd9cf96957..ea25bb411f89 100644
@@ -1,29 +1,37 @@
 [
     {
         "BriefDescription": "Counts every 64B read  request entering the Memory Controller 0 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read request entering the Memory Controller 0 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 0 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B read request entering the Memory Controller 1 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read entering the Memory Controller 1 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 1 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "ACT command for a read request sent to DRAM",
Signature · 1 line
2.40.0.577.gac1e443424-goog
author reviewer
#1 lore raw

PATCH 2/5 perf vendor events intel: Update free running icelakex events

Fix the PMU names, event code and umask. Remove UNC_IIO_BANDWIDTH_OUT events that aren't supported.

These updates were generated by:
https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py
with this PR:
https://github.com/intel/perfmon/pull/66

---
 .../arch/x86/icelakex/uncore-memory.json      |  4 +-
 .../arch/x86/icelakex/uncore-other.json       | 84 ++++++-------------
 2 files changed, 30 insertions(+), 58 deletions(-)
tools/perf/pmu-events/arch/x86/icelakex/uncore-memory.json +3 -1
index 66bb4538c6f2..814d9599474d 100644
@@ -106,9 +106,11 @@
     },
     {
         "BriefDescription": "Free running counter that increments for the Memory Controller",
+        "EventCode": "0xff",
         "EventName": "UNC_M_CLOCKTICKS_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x10",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "DRAM Precharge All Commands",
tools/perf/pmu-events/arch/x86/icelakex/uncore-other.json +27 -57

136 lines not on this page · raw message

Signature · 1 line
2.40.0.577.gac1e443424-goog
author reviewer
#2 lore raw

PATCH 3/5 perf vendor events intel: Correct knightslanding memory topic

In reply to Ian Rogers

Correct the memory topic of events for the imc related PMUs.

These updates were generated by:
https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py
with this PR:
https://github.com/intel/perfmon/pull/66

---
 .../x86/knightslanding/uncore-memory.json     | 38 +++++++++++++++++++
 .../arch/x86/knightslanding/uncore-other.json | 36 ------------------
 2 files changed, 38 insertions(+), 36 deletions(-)
 create mode 100644 tools/perf/pmu-events/arch/x86/knightslanding/uncore-memory.json
tools/perf/pmu-events/arch/x86/knightslanding/uncore-memory.json new file +38 -0
new file mode 100644
index 000000000000..47da947b1a6e
@@ -0,0 +1,38 @@
+[
+    {
+        "BriefDescription": "CAS All",
+        "EventCode": "0x03",
+        "EventName": "UNC_M_CAS_COUNT.ALL",
+        "PerPkg": "1",
+        "UMask": "0x3",
+        "Unit": "iMC_DCLK"
+    },
+    {
+        "BriefDescription": "CAS Reads",
+        "EventCode": "0x03",
+        "EventName": "UNC_M_CAS_COUNT.RD",
+        "PerPkg": "1",
+        "UMask": "0x1",
+        "Unit": "iMC_DCLK"
+    },
+    {
+        "BriefDescription": "CAS Writes",
+        "EventCode": "0x03",
+        "EventName": "UNC_M_CAS_COUNT.WR",
+        "PerPkg": "1",
+        "UMask": "0x2",
+        "Unit": "iMC_DCLK"
+    },
+    {
+        "BriefDescription": "DCLK count",
+        "EventName": "UNC_M_D_CLOCKTICKS",
+        "PerPkg": "1",
+        "Unit": "iMC_DCLK"
+    },
+    {
+        "BriefDescription": "UCLK count",
+        "EventName": "UNC_M_U_CLOCKTICKS",
+        "PerPkg": "1",
+        "Unit": "iMC_UCLK"
+    }
+]
tools/perf/pmu-events/arch/x86/knightslanding/uncore-other.json +0 -36
index 491cb37ddab0..fc85e0c95318 100644
@@ -3621,41 +3621,5 @@
         "PerPkg": "1",
         "UMask": "0x4",
         "Unit": "M2PCIe"
-    },
-    {
-        "BriefDescription": "CAS All",
-        "EventCode": "0x03",
-        "EventName": "UNC_M_CAS_COUNT.ALL",
-        "PerPkg": "1",
-        "UMask": "0x3",
-        "Unit": "iMC_DCLK"
-    },
-    {
-        "BriefDescription": "CAS Reads",
-        "EventCode": "0x03",
-        "EventName": "UNC_M_CAS_COUNT.RD",
-        "PerPkg": "1",
-        "UMask": "0x1",
-        "Unit": "iMC_DCLK"
-    },
-    {
-        "BriefDescription": "CAS Writes",
-        "EventCode": "0x03",
-        "EventName": "UNC_M_CAS_COUNT.WR",
-        "PerPkg": "1",
-        "UMask": "0x2",
-        "Unit": "iMC_DCLK"
-    },
-    {
-        "BriefDescription": "DCLK count",
-        "EventName": "UNC_M_D_CLOCKTICKS",
-        "PerPkg": "1",
-        "Unit": "iMC_DCLK"
-    },
-    {
-        "BriefDescription": "UCLK count",
-        "EventName": "UNC_M_U_CLOCKTICKS",
-        "PerPkg": "1",
-        "Unit": "iMC_UCLK"
     }
 ]
Signature · 1 line
2.40.0.577.gac1e443424-goog
author reviewer
#3 lore raw

PATCH 4/5 perf vendor events intel: Update free running snowridgex events

In reply to Ian Rogers

Fix the PMU names, event code and umask. Remove UNC_IIO_BANDWIDTH_OUT events that aren't supported.

These updates were generated by:
https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py
with this PR:
https://github.com/intel/perfmon/pull/66

---
 .../arch/x86/snowridgex/uncore-memory.json    |  4 +-
 .../arch/x86/snowridgex/uncore-other.json     | 92 ++++++-------------
 2 files changed, 30 insertions(+), 66 deletions(-)
tools/perf/pmu-events/arch/x86/snowridgex/uncore-memory.json +3 -1
index 7dc0910694ed..530e9b71b92a 100644
@@ -127,10 +127,12 @@
     },
     {
         "BriefDescription": "Free running counter that increments for the Memory Controller",
+        "EventCode": "0xff",
         "EventName": "UNC_M_CLOCKTICKS_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "UNC_M_CLOCKTICKS_FREERUN",
-        "Unit": "iMC"
+        "UMask": "0x10",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "DRAM Precharge All Commands",
tools/perf/pmu-events/arch/x86/snowridgex/uncore-other.json +27 -65

152 lines not on this page · raw message

Signature · 1 line
2.40.0.577.gac1e443424-goog
author reviewer
#4 lore raw

PATCH 5/5 perf vendor events intel: Update free running tigerlake events

In reply to Ian Rogers

Fix the topic, PMU name, event code and umask.

These updates were generated by:
https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py
with this PR:
https://github.com/intel/perfmon/pull/66

---
 .../arch/x86/tigerlake/uncore-memory.json     | 50 +++++++++++++++++++
 .../arch/x86/tigerlake/uncore-other.json      | 36 -------------
 2 files changed, 50 insertions(+), 36 deletions(-)
 create mode 100644 tools/perf/pmu-events/arch/x86/tigerlake/uncore-memory.json
tools/perf/pmu-events/arch/x86/tigerlake/uncore-memory.json new file +50 -0
new file mode 100644
index 000000000000..bba7b6d04e1d
@@ -0,0 +1,50 @@
+[
+    {
+        "BriefDescription": "Counts every read (RdCAS) issued by the Memory Controller to DRAM (sum of all channels). All requests result in 64 byte data transfers from DRAM.",
+        "EventCode": "0xff",
+        "EventName": "UNC_MC0_RDCAS_COUNT_FREERUN",
+        "PerPkg": "1",
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
+    },
+    {
+        "BriefDescription": "Counts every 64B read and write request entering the Memory Controller to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
+        "EventName": "UNC_MC0_TOTAL_REQCOUNT_FREERUN",
+        "PerPkg": "1",
+        "UMask": "0x10",
+        "Unit": "imc_free_running"
+    },
+    {
+        "BriefDescription": "Counts every write (WrCAS) issued by the Memory Controller to DRAM (sum of all channels). All requests result in 64 byte data transfers from DRAM.",
+        "EventCode": "0xff",
+        "EventName": "UNC_MC0_WRCAS_COUNT_FREERUN",
+        "PerPkg": "1",
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
+    },
+    {
+        "BriefDescription": "Counts every read (RdCAS) issued by the Memory Controller to DRAM (sum of all channels). All requests result in 64 byte data transfers from DRAM.",
+        "EventCode": "0xff",
+        "EventName": "UNC_MC1_RDCAS_COUNT_FREERUN",
+        "PerPkg": "1",
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
+    },
+    {
+        "BriefDescription": "Counts every 64B read and write request entering the Memory Controller to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
+        "EventName": "UNC_MC1_TOTAL_REQCOUNT_FREERUN",
+        "PerPkg": "1",
+        "UMask": "0x10",
+        "Unit": "imc_free_running"
+    },
+    {
+        "BriefDescription": "Counts every write (WrCAS) issued by the Memory Controller to DRAM (sum of all channels). All requests result in 64 byte data transfers from DRAM.",
+        "EventCode": "0xff",
+        "EventName": "UNC_MC1_WRCAS_COUNT_FREERUN",
+        "PerPkg": "1",
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
+    }
+]
tools/perf/pmu-events/arch/x86/tigerlake/uncore-other.json +0 -36
index a5a254327ae9..6e43aaf64e28 100644
@@ -93,41 +93,5 @@
         "EventName": "UNC_CLOCK.SOCKET",
         "PerPkg": "1",
         "Unit": "CLOCK"
-    },
-    {
-        "BriefDescription": "Counts every read (RdCAS) issued by the Memory Controller to DRAM (sum of all channels). All requests result in 64 byte data transfers from DRAM.",
-        "EventName": "UNC_MC0_RDCAS_COUNT_FREERUN",
-        "PerPkg": "1",
-        "Unit": "imc"
-    },
-    {
-        "BriefDescription": "Counts every 64B read and write request entering the Memory Controller to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
-        "EventName": "UNC_MC0_TOTAL_REQCOUNT_FREERUN",
-        "PerPkg": "1",
-        "Unit": "imc"
-    },
-    {
-        "BriefDescription": "Counts every write (WrCAS) issued by the Memory Controller to DRAM (sum of all channels). All requests result in 64 byte data transfers from DRAM.",
-        "EventName": "UNC_MC0_WRCAS_COUNT_FREERUN",
-        "PerPkg": "1",
-        "Unit": "imc"
-    },
-    {
-        "BriefDescription": "Counts every read (RdCAS) issued by the Memory Controller to DRAM (sum of all channels). All requests result in 64 byte data transfers from DRAM.",
-        "EventName": "UNC_MC1_RDCAS_COUNT_FREERUN",
-        "PerPkg": "1",
-        "Unit": "imc"
-    },
-    {
-        "BriefDescription": "Counts every 64B read and write request entering the Memory Controller to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
-        "EventName": "UNC_MC1_TOTAL_REQCOUNT_FREERUN",
-        "PerPkg": "1",
-        "Unit": "imc"
-    },
-    {
-        "BriefDescription": "Counts every write (WrCAS) issued by the Memory Controller to DRAM (sum of all channels). All requests result in 64 byte data transfers from DRAM.",
-        "EventName": "UNC_MC1_WRCAS_COUNT_FREERUN",
-        "PerPkg": "1",
-        "Unit": "imc"
     }
 ]
Signature · 1 line
2.40.0.577.gac1e443424-goog
#5 lore raw
In reply to Ian Rogers
Quoted 18 lines · Ian Rogers

Fix the PMU name, event code and umask.

These updates were generated by:
https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py
with this PR:
https://github.com/intel/perfmon/pull/66

---
 .../arch/x86/alderlake/uncore-memory.json        | 16 ++++++++++++----
 .../arch/x86/alderlaken/uncore-memory.json       | 16 ++++++++++++----
 2 files changed, 24 insertions(+), 8 deletions(-)
tools/perf/pmu-events/arch/x86/alderlake/uncore-memory.json +0 -0
index 2ccd9cf96957..ea25bb411f89 100644

tools/perf/pmu-events/arch/x86/alderlake/uncore-memory.json line 9

Quoted 10 lines
tools/perf/pmu-events/arch/x86/alderlake/uncore-memory.json +3 -1
@@ -1,29 +1,37 @@
 [
     {
         "BriefDescription": "Counts every 64B read  request entering the Memory Controller 0 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read request entering the Memory Controller 0 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"

The imc_free_running will give the counter value for both imc0 and imc1.

I think we need "Unit": "imc_free_running_0" here. But I'm not sure if the perf tool can handle it.

Thanks,
Kan

Quoted 77 lines
tools/perf/pmu-events/arch/x86/alderlake/uncore-memory.json +9 -3
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 0 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B read request entering the Memory Controller 1 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read entering the Memory Controller 1 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 1 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "ACT command for a read request sent to DRAM",
tools/perf/pmu-events/arch/x86/alderlaken/uncore-memory.json +12 -4
index 2ccd9cf96957..ea25bb411f89 100644
@@ -1,29 +1,37 @@
 [
     {
         "BriefDescription": "Counts every 64B read  request entering the Memory Controller 0 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read request entering the Memory Controller 0 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 0 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B read request entering the Memory Controller 1 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read entering the Memory Controller 1 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 1 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "ACT command for a read request sent to DRAM",
author reviewer
#6 lore raw
Quoted 35 lines · Kan
Quoted 18 lines · Ian Rogers

Fix the PMU name, event code and umask.

These updates were generated by:
https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py
with this PR:
https://github.com/intel/perfmon/pull/66

---
 .../arch/x86/alderlake/uncore-memory.json        | 16 ++++++++++++----
 .../arch/x86/alderlaken/uncore-memory.json       | 16 ++++++++++++----
 2 files changed, 24 insertions(+), 8 deletions(-)
tools/perf/pmu-events/arch/x86/alderlake/uncore-memory.json +0 -0
index 2ccd9cf96957..ea25bb411f89 100644

tools/perf/pmu-events/arch/x86/alderlake/uncore-memory.json line 9

Quoted 10 lines
tools/perf/pmu-events/arch/x86/alderlake/uncore-memory.json +3 -1
@@ -1,29 +1,37 @@
 [
     {
         "BriefDescription": "Counts every 64B read  request entering the Memory Controller 0 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read request entering the Memory Controller 0 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"

The imc_free_running will give the counter value for both imc0 and imc1.

Quoted 2 lines

I think we need "Unit": "imc_free_running_0" here. But I'm not sure if the perf tool can handle it.

Thanks Kan, it can handle it so I'll update in v2.

Ian

Quoted 80 lines

Thanks,
Kan

Quoted 77 lines
tools/perf/pmu-events/arch/x86/alderlake/uncore-memory.json +9 -3
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 0 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B read request entering the Memory Controller 1 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read entering the Memory Controller 1 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 1 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "ACT command for a read request sent to DRAM",
tools/perf/pmu-events/arch/x86/alderlaken/uncore-memory.json +12 -4
index 2ccd9cf96957..ea25bb411f89 100644
@@ -1,29 +1,37 @@
 [
     {
         "BriefDescription": "Counts every 64B read  request entering the Memory Controller 0 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read request entering the Memory Controller 0 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 0 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC0_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B read request entering the Memory Controller 1 to DRAM (sum of all channels).",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_RDCAS_COUNT_FREERUN",
         "PerPkg": "1",
         "PublicDescription": "Counts every 64B read entering the Memory Controller 1 to DRAM (sum of all channels).",
-        "Unit": "iMC"
+        "UMask": "0x20",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "Counts every 64B write request entering the Memory Controller 1 to DRAM (sum of all channels). Each write request counts as a new request incrementing this counter. However, same cache line write requests (both full and partial) are combined to a single 64 byte data transfer to DRAM.",
+        "EventCode": "0xff",
         "EventName": "UNC_MC1_WRCAS_COUNT_FREERUN",
         "PerPkg": "1",
-        "Unit": "iMC"
+        "UMask": "0x30",
+        "Unit": "imc_free_running"
     },
     {
         "BriefDescription": "ACT command for a read request sent to DRAM",