Skip to content

Commit

Permalink
perf vendor events amd: Update Zen 5 data cache fill events
Browse files Browse the repository at this point in the history
For events that count data cache fills, some combinations of the unit
mask bits are useful for counting fills from local caches, DRAM or any
far sources. However, named events currently exist for PMCx044 (Any Data
Cache Fills) only. Add similar events for the following base events.
  * PMCx043 (Demand Data Cache Fills)
  * PMCx059 (Software Prefetch Data Cache Fills)
  * PMCx05A (Hardware Prefetch Data Cache Fills)

While at it, remove "ls_any_fills_from_sys.all_dram_io" since it is a
duplicate of "ls_any_fills_from_sys.dram_io_all".

Event descriptions can be found in Section 2.1.16.5.2 "Load/Store (LS)
Events" of the Processor Programming Reference (PPR) for AMD Family 1Ah
Model 02h Revision C1 Processors document available at the link below.

Link: https://bugzilla.kernel.org/attachment.cgi?id=307010
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: ananth.narayan@amd.com
Cc: ravi.bangoria@amd.com
Cc: eranian@google.com
Link: https://lore.kernel.org/r/e036e3c9fb962c939fa06c855b68e532ee609e01.1729242778.git.sandipan.das@amd.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
  • Loading branch information
Sandipan Das authored and Namhyung Kim committed Oct 19, 2024
1 parent 17aedce commit 46610ba
Showing 1 changed file with 72 additions and 6 deletions.
78 changes: 72 additions & 6 deletions tools/perf/pmu-events/arch/x86/amdzen5/load-store.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
"BriefDescription": "Demand data cache fills from L3 cache or different L2 cache in the same CCX.",
"UMask": "0x02"
},
{
"EventName": "ls_dmnd_fills_from_sys.local_all",
"EventCode": "0x43",
"BriefDescription": "Demand data cache fills from local L2 cache, L3 cache or different L2 cache in the same CCX.",
"UMask": "0x03"
},
{
"EventName": "ls_dmnd_fills_from_sys.near_cache",
"EventCode": "0x43",
Expand All @@ -114,12 +120,30 @@
"BriefDescription": "Demand data cache fills from cache of another CCX when the address was in a different NUMA node.",
"UMask": "0x10"
},
{
"EventName": "ls_dmnd_fills_from_sys.remote_cache",
"EventCode": "0x43",
"BriefDescription": "Demand data cache fills from cache of another CCX when the address was in the same or a different NUMA node.",
"UMask": "0x14"
},
{
"EventName": "ls_dmnd_fills_from_sys.dram_io_far",
"EventCode": "0x43",
"BriefDescription": "Demand data cache fills from either DRAM or MMIO in a different NUMA node (same or different socket).",
"UMask": "0x40"
},
{
"EventName": "ls_dmnd_fills_from_sys.dram_io_all",
"EventCode": "0x43",
"BriefDescription": "Demand data cache fills from either DRAM or MMIO in the same or a different NUMA node (same or different socket).",
"UMask": "0x48"
},
{
"EventName": "ls_dmnd_fills_from_sys.far_all",
"EventCode": "0x43",
"BriefDescription": "Demand data cache fills from either cache of another CCX, DRAM or MMIO when the address was in a different NUMA node (same or different socket).",
"UMask": "0x50"
},
{
"EventName": "ls_dmnd_fills_from_sys.alternate_memories",
"EventCode": "0x43",
Expand Down Expand Up @@ -192,12 +216,6 @@
"BriefDescription": "Any data cache fills from either cache of another CCX, DRAM or MMIO when the address was in a different NUMA node (same or different socket).",
"UMask": "0x50"
},
{
"EventName": "ls_any_fills_from_sys.all_dram_io",
"EventCode": "0x44",
"BriefDescription": "Any data cache fills from either DRAM or MMIO in any NUMA node (same or different socket).",
"UMask": "0x48"
},
{
"EventName": "ls_any_fills_from_sys.alternate_memories",
"EventCode": "0x44",
Expand Down Expand Up @@ -342,6 +360,12 @@
"BriefDescription": "Software prefetch data cache fills from L3 cache or different L2 cache in the same CCX.",
"UMask": "0x02"
},
{
"EventName": "ls_sw_pf_dc_fills.local_all",
"EventCode": "0x59",
"BriefDescription": "Software prefetch data cache fills from local L2 cache, L3 cache or different L2 cache in the same CCX.",
"UMask": "0x03"
},
{
"EventName": "ls_sw_pf_dc_fills.near_cache",
"EventCode": "0x59",
Expand All @@ -360,12 +384,30 @@
"BriefDescription": "Software prefetch data cache fills from cache of another CCX in a different NUMA node.",
"UMask": "0x10"
},
{
"EventName": "ls_sw_pf_dc_fills.remote_cache",
"EventCode": "0x59",
"BriefDescription": "Software prefetch data cache fills from cache of another CCX when the address was in the same or a different NUMA node.",
"UMask": "0x14"
},
{
"EventName": "ls_sw_pf_dc_fills.dram_io_far",
"EventCode": "0x59",
"BriefDescription": "Software prefetch data cache fills from either DRAM or MMIO in a different NUMA node (same or different socket).",
"UMask": "0x40"
},
{
"EventName": "ls_sw_pf_dc_fills.dram_io_all",
"EventCode": "0x59",
"BriefDescription": "Software prefetch data cache fills from either DRAM or MMIO in the same or a different NUMA node (same or different socket).",
"UMask": "0x48"
},
{
"EventName": "ls_sw_pf_dc_fills.far_all",
"EventCode": "0x59",
"BriefDescription": "Software prefetch data cache fills from either cache of another CCX, DRAM or MMIO when the address was in a different NUMA node (same or different socket).",
"UMask": "0x50"
},
{
"EventName": "ls_sw_pf_dc_fills.alternate_memories",
"EventCode": "0x59",
Expand All @@ -390,6 +432,12 @@
"BriefDescription": "Hardware prefetch data cache fills from L3 cache or different L2 cache in the same CCX.",
"UMask": "0x02"
},
{
"EventName": "ls_hw_pf_dc_fills.local_all",
"EventCode": "0x5a",
"BriefDescription": "Hardware prefetch data cache fills from local L2 cache, L3 cache or different L2 cache in the same CCX.",
"UMask": "0x03"
},
{
"EventName": "ls_hw_pf_dc_fills.near_cache",
"EventCode": "0x5a",
Expand All @@ -408,12 +456,30 @@
"BriefDescription": "Hardware prefetch data cache fills from cache of another CCX when the address was in a different NUMA node.",
"UMask": "0x10"
},
{
"EventName": "ls_hw_pf_dc_fills.remote_cache",
"EventCode": "0x5a",
"BriefDescription": "Hardware prefetch data cache fills from cache of another CCX when the address was in the same or a different NUMA node.",
"UMask": "0x14"
},
{
"EventName": "ls_hw_pf_dc_fills.dram_io_far",
"EventCode": "0x5a",
"BriefDescription": "Hardware prefetch data cache fills from either DRAM or MMIO in a different NUMA node (same or different socket).",
"UMask": "0x40"
},
{
"EventName": "ls_hw_pf_dc_fills.dram_io_all",
"EventCode": "0x5a",
"BriefDescription": "Hardware prefetch data cache fills from either DRAM or MMIO in the same or a different NUMA node (same or different socket).",
"UMask": "0x48"
},
{
"EventName": "ls_hw_pf_dc_fills.far_all",
"EventCode": "0x5a",
"BriefDescription": "Hardware prefetch data cache fills from either cache of another CCX, DRAM or MMIO when the address was in a different NUMA node (same or different socket).",
"UMask": "0x50"
},
{
"EventName": "ls_hw_pf_dc_fills.alternate_memories",
"EventCode": "0x5a",
Expand Down

0 comments on commit 46610ba

Please sign in to comment.