latest PMU events for zen1/zen2
v2 cover latest PMU events for zen1/zen2
This series of patches brings the PMU events for AMD family 17h series of processors up to date with the latest versions of the AMD processor programming reference manuals.
The first patch changes the pmu events mapfile to be more selective for the model number rather than blanket detecting all f17h processors to have the same events directory. This is required for the later patch where we add events for zen2 based processors. In v2 of the patch, the incorrect regex for model string was correct to include the range 0 through 2f.
The second patch adds the PMU events for zen2. In v2 ls_mab_alloc.loads umask is corrected. No events from Zen1 have been removed.
Finally the third patch updates the zen1 PMU events to be in accordance with the latest PPR version and bumps up the events version to v2. In v2 of the patch series, missing events (bp_dyn_ind_pred and bp_de_redirect) were added and umasks were corrected for fpu_pipe_assignment.dual* and ls_mab_alloc.loads.
Vijay Thakkar (3):
perf vendor events amd: restrict model detection for zen1 based
processors
perf vendor events amd: add Zen2 events
perf vendor events amd: update Zen1 events to V2
.../pmu-events/arch/x86/amdfam17h/branch.json | 12 -
.../pmu-events/arch/x86/amdzen1/branch.json | 23 ++
.../x86/{amdfam17h => amdzen1}/cache.json | 0
.../pmu-events/arch/x86/amdzen1/core.json | 129 ++++++
.../floating-point.json | 56 +++
.../x86/{amdfam17h => amdzen1}/memory.json | 18 +
.../x86/{amdfam17h => amdzen1}/other.json | 0
.../pmu-events/arch/x86/amdzen2/branch.json | 56 +++
.../pmu-events/arch/x86/amdzen2/cache.json | 375 ++++++++++++++++++
.../arch/x86/{amdfam17h => amdzen2}/core.json | 0
.../arch/x86/amdzen2/floating-point.json | 128 ++++++
.../pmu-events/arch/x86/amdzen2/memory.json | 349 ++++++++++++++++
.../pmu-events/arch/x86/amdzen2/other.json | 137 +++++++
tools/perf/pmu-events/arch/x86/mapfile.csv | 3 +-
14 files changed, 1273 insertions(+), 13 deletions(-)
delete mode 100644 tools/perf/pmu-events/arch/x86/amdfam17h/branch.json
create mode 100644 tools/perf/pmu-events/arch/x86/amdzen1/branch.json
rename tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/cache.json (100%)
create mode 100644 tools/perf/pmu-events/arch/x86/amdzen1/core.json
rename tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/floating-point.json (63%)
rename tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/memory.json (93%)
rename tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/other.json (100%)
create mode 100644 tools/perf/pmu-events/arch/x86/amdzen2/branch.json
create mode 100644 tools/perf/pmu-events/arch/x86/amdzen2/cache.json
rename tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen2}/core.json (100%)
create mode 100644 tools/perf/pmu-events/arch/x86/amdzen2/floating-point.json
create mode 100644 tools/perf/pmu-events/arch/x86/amdzen2/memory.json
create mode 100644 tools/perf/pmu-events/arch/x86/amdzen2/other.jsonSignature · 1 line
2.25.1
PATCH v2 1/3 perf vendor events amd: restrict model detection for zen1 based processors
This patch changes the previous blanket detection of AMD Family 17h processors to be more specific to Zen1 core based products only by replacing model detection regex pattern [[:xdigit:]]+ with ([12][0-9A-F]|[0-9A-F]), restricting to models 0 though 2f only.
This change is required to allow for the addition of separate PMU events for Zen2 core based models in the following patches as those belong to family 17h but have different PMCs. Current PMU events directory has also been renamed to "amdzen1" from "amdfam17h" to reflect this specificity.
Note that although this change does not break PMU counters for existing zen1 based systems, it does disable the current set of counters for zen2 based systems. Counters for zen2 have been added in the following patches in this patchset.
---
Changes in v2:
- Change Zen1 model detection regex to include all models in range 0 through 2F inclusive.
.../perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/branch.json | 0
.../perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/cache.json | 0
tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/core.json | 0
.../arch/x86/{amdfam17h => amdzen1}/floating-point.json | 0
.../perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/memory.json | 0
.../perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/other.json | 0
tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +-
7 files changed, 1 insertion(+), 1 deletion(-)
rename tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/branch.json (100%)
rename tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/cache.json (100%)
rename tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/core.json (100%)
rename tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/floating-point.json (100%)
rename tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/memory.json (100%)
rename tools/perf/pmu-events/arch/x86/{amdfam17h => amdzen1}/other.json (100%)tools/perf/pmu-events/arch/x86/amdzen1/branch.json renamed from tools/perf/pmu-events/arch/x86/amdfam17h/branch.json +0 -0
tools/perf/pmu-events/arch/x86/amdzen1/cache.json renamed from tools/perf/pmu-events/arch/x86/amdfam17h/cache.json +0 -0
tools/perf/pmu-events/arch/x86/amdzen1/core.json renamed from tools/perf/pmu-events/arch/x86/amdfam17h/core.json +0 -0
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json renamed from tools/perf/pmu-events/arch/x86/amdfam17h/floating-point.json +0 -0
tools/perf/pmu-events/arch/x86/amdzen1/memory.json renamed from tools/perf/pmu-events/arch/x86/amdfam17h/memory.json +0 -0
tools/perf/pmu-events/arch/x86/amdzen1/other.json renamed from tools/perf/pmu-events/arch/x86/amdfam17h/other.json +0 -0
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -1
@@ -36,4 +36,4 @@ GenuineIntel-6-55-[56789ABCDEF],v1,cascadelakex,core GenuineIntel-6-7D,v1,icelake,core GenuineIntel-6-7E,v1,icelake,core GenuineIntel-6-86,v1,tremontx,core -AuthenticAMD-23-[[:xdigit:]]+,v1,amdfam17h,core +AuthenticAMD-23-([12][0-9A-F]|[0-9A-F]),v1,amdzen1,core
Signature · 1 line
2.25.1
PATCH v2 2/3 perf vendor events amd: add Zen2 events
In reply to Vijay ThakkarThis patch adds PMU events for AMD Zen2 core based processors, namely, Matisse (model 71h), Castle Peak (model 31h) and Rome (model 2xh), as documented in the AMD Processor Programming Reference for Matisse [1]. Zen2 adds some additional counters that are not present in Zen1 and events for them have been added in this patch. Some counters have also been removed for Zen2 thatwere previously present in Zen1 and have been confirmed to always sample zero on zen2. These added/removed counters have been omitted for brevity but can be found here:
https://gist.github.com/thakkarV/5b12ca5fd7488eb2c42e451e40bdd5f3
Note that PPR for Zen2 [1] does not include some counters that were documented in the PPR for Zen1 based processors [2]. After having tested these counters, some of them that still work for zen2 systems have been preserved in the events for zen2. The counters that are omitted in [1] but are still measurable and non-zero on zen2 (tested on a Ryzen 3900X system) are the following:
PMC 0x000 fpu_pipe_assignment.{total|total0|total1|total2|total3} PMC 0x004 fp_num_mov_elim_scal_op.*
PMC 0x046 ls_tablewalker.*
PMC 0x062 l2_latency.l2_cycles_waiting_on_fills
PMC 0x063 l2_wcb_req.*
PMC 0x06D l2_fill_pending.l2_fill_busy
PMC 0x080 ic_fw32
PMC 0x081 ic_fw32_miss
PMC 0x086 bp_snp_re_sync
PMC 0x087 ic_fetch_stall.*
PMC 0x08C ic_cache_inval.*
PMC 0x099 bp_tlb_rel
PMC 0x0C7 ex_ret_brn_resync
PMC 0x28A ic_oc_mode_switch.*
L3PMC 0x001 l3_request_g1.*
L3PMC 0x006 l3_comb_clstr_state.*
[1]: Processor Programming Reference (PPR) for AMD Family 17h Model 71h, Revision B0 Processors, 56176 Rev 3.06 - Jul 17, 2019
[2]: Processor Programming Reference (PPR) for AMD Family 17h Models 01h,08h, Revision B2 Processors, 54945 Rev 3.03 - Jun 14, 2019 All of the PPRs can be found at:
https://bugzilla.kernel.org/show_bug.cgi?id=206537
---
Changes in v2:
- Correct UMask for ls_mab_alloc.loads
.../pmu-events/arch/x86/amdzen2/branch.json | 56 +++ .../pmu-events/arch/x86/amdzen2/cache.json | 375 ++++++++++++++++++ .../pmu-events/arch/x86/amdzen2/core.json | 134 +++++++ .../arch/x86/amdzen2/floating-point.json | 128 ++++++ .../pmu-events/arch/x86/amdzen2/memory.json | 349 ++++++++++++++++ .../pmu-events/arch/x86/amdzen2/other.json | 137 +++++++ tools/perf/pmu-events/arch/x86/mapfile.csv | 1 + 7 files changed, 1180 insertions(+) create mode 100644 tools/perf/pmu-events/arch/x86/amdzen2/branch.json create mode 100644 tools/perf/pmu-events/arch/x86/amdzen2/cache.json create mode 100644 tools/perf/pmu-events/arch/x86/amdzen2/core.json create mode 100644 tools/perf/pmu-events/arch/x86/amdzen2/floating-point.json create mode 100644 tools/perf/pmu-events/arch/x86/amdzen2/memory.json create mode 100644 tools/perf/pmu-events/arch/x86/amdzen2/other.json
tools/perf/pmu-events/arch/x86/amdzen2/branch.json new file +56 -0
@@ -0,0 +1,56 @@ +[ + { + "EventName": "bp_l1_btb_correct", + "EventCode": "0x8a", + "BriefDescription": "L1 BTB Correction." + }, + { + "EventName": "bp_l2_btb_correct", + "EventCode": "0x8b", + "BriefDescription": "L2 BTB Correction." + }, + { + "EventName": "bp_dyn_ind_pred", + "EventCode": "0x8e", + "BriefDescription": "Dynamic Indirect Predictions.", + "PublicDescription": "Indirect Branch Prediction for potential multi-target branch (speculative)." + }, + { + "EventName": "bp_de_redirect", + "EventCode": "0x91", + "BriefDescription": "Decoder Overrides Existing Branch Prediction (speculative)." + }, + { + "EventName": "bp_l1_tlb_fetch_hit", + "EventCode": "0x94", + "BriefDescription": "All instruction fetches.", + "PublicDescription": "The number of instruction fetches that hit in the L1 ITLB.", + "UMask": "0xFF" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if1g", + "EventCode": "0x94", + "BriefDescription": "Instuction fetches to a 1GB page.", + "PublicDescription": "The number of instruction fetches that hit in the L1 ITLB.", + "UMask": "0x4" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if2m", + "EventCode": "0x94", + "BriefDescription": "Instuction fetches to a 2MB page.", + "PublicDescription": "The number of instruction fetches that hit in the L1 ITLB.", + "UMask": "0x2" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if4k", + "EventCode": "0x94", + "BriefDescription": "Instuction fetches to a 4KB page.", + "PublicDescription": "The number of instruction fetches that hit in the L1 ITLB.", + "UMask": "0x1" + }, + { + "EventName": "bp_tlb_rel", + "EventCode": "0x99", + "BriefDescription": "The number of ITLB reload requests." + } +]
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +375 -0
375 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/amdzen2/core.json new file +134 -0
134 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/amdzen2/floating-point.json new file +128 -0
128 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +349 -0
349 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/amdzen2/other.json new file +137 -0
137 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -0
@@ -37,3 +37,4 @@ GenuineIntel-6-7D,v1,icelake,core GenuineIntel-6-7E,v1,icelake,core GenuineIntel-6-86,v1,tremontx,core AuthenticAMD-23-([12][0-9A-F]|[0-9A-F]),v1,amdzen1,core +AuthenticAMD-23-[[:xdigit:]]+,v1,amdzen2,core
Signature · 1 line
2.25.1
Re: [PATCH v2 2/3] perf vendor events amd: add Zen2 events
On 2/25/20 1:28 PM, Vijay Thakkar wrote:
<snip>
tools/perf/pmu-events/arch/x86/amdzen2/branch.json line 26
Quoted 4 lines
tools/perf/pmu-events/arch/x86/amdzen2/branch.json new file +4
-0+ { + "EventName": "bp_l1_tlb_fetch_hit", + "EventCode": "0x94", + "BriefDescription": "All instruction fetches.",
Nit picking here, but "All instruction fetches" doesn't occur in PMCx094's description. I'm looking at both Model 71h and 31h documentation. This event specifically calls out the context of the L1 ITLB and its *hits*, i.e., specifically this text:
Quoted 1 line
+ "PublicDescription": "The number of instruction fetches that hit in the L1 ITLB.",
So this is the text that should probably be in the BriefDescription as well, but if both BriefDescription and PublicDescription are going to be equal, just provide the BriefDescription version, since it shows with and without the -v and --details flags to perf list.
tools/perf/pmu-events/arch/x86/amdzen2/branch.json line 33
Quoted 6 lines
tools/perf/pmu-events/arch/x86/amdzen2/branch.json new file +6
-0+ "UMask": "0xFF" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if1g", + "EventCode": "0x94", + "BriefDescription": "Instuction fetches to a 1GB page.",
^^^^^^^^^^ Instruction
Quoted 1 line
+ "PublicDescription": "The number of instruction fetches that hit in the L1 ITLB.",
"The number of instruction fetches that hit in the L1 ITLB. Instruction fetches to a 1 GB page."
tools/perf/pmu-events/arch/x86/amdzen2/branch.json line 40
Quoted 6 lines
tools/perf/pmu-events/arch/x86/amdzen2/branch.json new file +6
-0+ "UMask": "0x4" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if2m", + "EventCode": "0x94", + "BriefDescription": "Instuction fetches to a 2MB page.",
^^^^^^^^^^ Instruction
Quoted 1 line
+ "PublicDescription": "The number of instruction fetches that hit in the L1 ITLB.",
Concatenate the BriefDescription text here.
tools/perf/pmu-events/arch/x86/amdzen2/branch.json line 47
Quoted 6 lines
tools/perf/pmu-events/arch/x86/amdzen2/branch.json new file +6
-0+ "UMask": "0x2" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if4k", + "EventCode": "0x94", + "BriefDescription": "Instuction fetches to a 4KB page.",
^^^^^^^^^^ Instruction
Quoted 1 line
+ "PublicDescription": "The number of instruction fetches that hit in the L1 ITLB.",
Concatenate the BriefDescription text here.
<snip>
Quoted 6 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +0
-0
tools/perf/pmu-events/arch/x86/amdzen2/cache.json line 8
Quoted 8 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +8
-0@@ -0,0 +1,375 @@ +[ + { + "EventName": "l2_request_g1.rd_blk_l", + "EventCode": "0x60", + "BriefDescription": "Requests to L2 Group1.", + "PublicDescription": "Requests to L2 Group1.", + "UMask": "0x80" + },
Where is the "Data Cache Reads (including hardware and software prefetch)." text from the document(s)?
tools/perf/pmu-events/arch/x86/amdzen2/cache.json line 15
Quoted 7 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +7
-0+ { + "EventName": "l2_request_g1.rd_blk_x", + "EventCode": "0x60", + "BriefDescription": "Requests to L2 Group1.", + "PublicDescription": "Requests to L2 Group1.", + "UMask": "0x40" + },
Here too: missing unit mask description text.
Quoted 25 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +25
-0+ { + "EventName": "l2_request_g1.ls_rd_blk_c_s", + "EventCode": "0x60", + "BriefDescription": "Requests to L2 Group1.", + "PublicDescription": "Requests to L2 Group1.", + "UMask": "0x20" + }, + { + "EventName": "l2_request_g1.cacheable_ic_read", + "EventCode": "0x60", + "BriefDescription": "Requests to L2 Group1.", + "PublicDescription": "Requests to L2 Group1.", + "UMask": "0x10" + }, + { + "EventName": "l2_request_g1.change_to_x", + "EventCode": "0x60", + "BriefDescription": "Requests to L2 Group1.", + "PublicDescription": "Requests to L2 Group1.", + "UMask": "0x8" + }, + { + "EventName": "l2_request_g1.prefetch_l2", + "EventCode": "0x60", + "BriefDescription": "Requests to L2 Group1.",
tools/perf/pmu-events/arch/x86/amdzen2/cache.json line 50
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +10
-0+ "PublicDescription": "Requests to L2 Group1.", + "UMask": "0x4" + }, + { + "EventName": "l2_request_g1.l2_hw_pf", + "EventCode": "0x60", + "BriefDescription": "Requests to L2 Group1.", + "PublicDescription": "Requests to L2 Group1.", + "UMask": "0x2" + },
same with all the above.
tools/perf/pmu-events/arch/x86/amdzen2/cache.json line 57
Quoted 7 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +7
-0+ { + "EventName": "l2_request_g1.other_requests", + "EventCode": "0x60", + "BriefDescription": "Events covered by l2_request_g2.", + "PublicDescription": "Requests to L2 Group1. Events covered by l2_request_g2.", + "UMask": "0x1" + },
This text doesn't match the text in either of these:
PPR for AMD Family 17h Model 71h B0 - 56176 Rev 3.06 - Jul 17, 2019 PPR for AMD Family 17h Model 31h B0 - 55803 Rev 0.54 - Sep 12, 2019
The text in the above is an improved version from the Zen 1 variants. Care to use the text from these documents?
Quoted 46 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +46
-0+ { + "EventName": "l2_request_g2.group1", + "EventCode": "0x61", + "BriefDescription": "All Group 1 commands not in unit0.", + "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous. All Group 1 commands not in unit0.", + "UMask": "0x80" + }, + { + "EventName": "l2_request_g2.ls_rd_sized", + "EventCode": "0x61", + "BriefDescription": "RdSized, RdSized32, RdSized64.", + "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous. RdSized, RdSized32, RdSized64.", + "UMask": "0x40" + }, + { + "EventName": "l2_request_g2.ls_rd_sized_nc", + "EventCode": "0x61", + "BriefDescription": "RdSizedNC, RdSized32NC, RdSized64NC.", + "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous. RdSizedNC, RdSized32NC, RdSized64NC.", + "UMask": "0x20" + }, + { + "EventName": "l2_request_g2.ic_rd_sized", + "EventCode": "0x61", + "BriefDescription": "Multi-events in that LS and IF requests can be received simultaneous.", + "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous.", + "UMask": "0x10" + }, + { + "EventName": "l2_request_g2.ic_rd_sized_nc", + "EventCode": "0x61", + "BriefDescription": "Multi-events in that LS and IF requests can be received simultaneous.", + "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous.", + "UMask": "0x8" + }, + { + "EventName": "l2_request_g2.smc_inval", + "EventCode": "0x61", + "BriefDescription": "Multi-events in that LS and IF requests can be received simultaneous.", + "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous.", + "UMask": "0x4" + }, + { + "EventName": "l2_request_g2.bus_locks_originator", + "EventCode": "0x61", + "BriefDescription": "Multi-events in that LS and IF requests can be received simultaneous.",
tools/perf/pmu-events/arch/x86/amdzen2/cache.json line 113
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +10
-0+ "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous.", + "UMask": "0x2" + }, + { + "EventName": "l2_request_g2.bus_locks_responses", + "EventCode": "0x61", + "BriefDescription": "Multi-events in that LS and IF requests can be received simultaneous.", + "PublicDescription": "Multi-events in that LS and IF requests can be received simultaneous.", + "UMask": "0x1" + },
that last comment applies to all the above.
Quoted 34 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +34
-0+ { + "EventName": "l2_latency.l2_cycles_waiting_on_fills", + "EventCode": "0x62", + "BriefDescription": "Total cycles spent waiting for L2 fills to complete from L3 or memory, divided by four. Event counts are for both threads. To calculate average latency, the number of fills from both threads must be used.", + "PublicDescription": "Total cycles spent waiting for L2 fills to complete from L3 or memory, divided by four. Event counts are for both threads. To calculate average latency, the number of fills from both threads must be used.", + "UMask": "0x1" + }, + { + "EventName": "l2_wcb_req.wcb_write", + "EventCode": "0x63", + "PublicDescription": "LS (Load/Store unit) to L2 WCB (Write Combining Buffer) write requests.", + "BriefDescription": "LS to L2 WCB write requests.", + "UMask": "0x40" + }, + { + "EventName": "l2_wcb_req.wcb_close", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB close requests.", + "PublicDescription": "LS (Load/Store unit) to L2 WCB (Write Combining Buffer) close requests.", + "UMask": "0x20" + }, + { + "EventName": "l2_wcb_req.zero_byte_store", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB zero byte store requests.", + "PublicDescription": "LS (Load/Store unit) to L2 WCB (Write Combining Buffer) zero byte store requests.", + "UMask": "0x4" + }, + { + "EventName": "l2_wcb_req.cl_zero", + "EventCode": "0x63", + "PublicDescription": "LS to L2 WCB cache line zeroing requests.", + "BriefDescription": "LS (Load/Store unit) to L2 WCB (Write Combining Buffer) cache line zeroing requests.", + "UMask": "0x1"
tools/perf/pmu-events/arch/x86/amdzen2/cache.json line 155
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +8
-0+ }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_cs", + "EventCode": "0x64", + "BriefDescription": "LS ReadBlock C/S Hit.", + "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. LS ReadBlock C/S Hit.", + "UMask": "0x80" + },
This text doesn't match that of the updated documents: please update it.
Quoted 39 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +39
-0+ { + "EventName": "l2_cache_req_stat.ls_rd_blk_l_hit_x", + "EventCode": "0x64", + "BriefDescription": "LS Read Block L Hit X.", + "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. LS Read Block L Hit X.", + "UMask": "0x40" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_l_hit_s", + "EventCode": "0x64", + "BriefDescription": "LsRdBlkL Hit Shared.", + "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. LsRdBlkL Hit Shared.", + "UMask": "0x20" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_x", + "EventCode": "0x64", + "BriefDescription": "LsRdBlkX/ChgToX Hit X. Count RdBlkX finding Shared as a Miss.", + "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. LsRdBlkX/ChgToX Hit X. Count RdBlkX finding Shared as a Miss.", + "UMask": "0x10" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_c", + "EventCode": "0x64", + "BriefDescription": "LS Read Block C S L X Change to X Miss.", + "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. LS Read Block C S L X Change to X Miss.", + "UMask": "0x8" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_hit_x", + "EventCode": "0x64", + "BriefDescription": "IC Fill Hit Exclusive Stale.", + "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. IC Fill Hit Exclusive Stale.", + "UMask": "0x4" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_hit_s", + "EventCode": "0x64", + "BriefDescription": "IC Fill Hit Shared.",
tools/perf/pmu-events/arch/x86/amdzen2/cache.json line 204
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +10
-0+ "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. IC Fill Hit Shared.", + "UMask": "0x2" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_miss", + "EventCode": "0x64", + "BriefDescription": "IC Fill Miss.", + "PublicDescription": "This event does not count accesses to the L2 cache by the L2 prefetcher, but it does count accesses by the L1 prefetcher. IC Fill Miss.", + "UMask": "0x1" + },
that last comment applies to all unit masks until here.
Quoted 5 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +5
-0+ { + "EventName": "l2_pf_hit_l2", + "EventCode": "0x70", + "BriefDescription": "All L2 prefetches accepted by the L2 pipeline which hit the L2." + },
tools/perf/pmu-events/arch/x86/amdzen2/cache.json line 226
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +10
-0+ { + "EventName": "l2_pf_miss_l2_hit_l3", + "EventCode": "0x71", + "BriefDescription": "All L2 prefetches accepted by the L2 pipeline which miss the L2 cache and hit the L3." + }, + { + "EventName": "l2_pf_miss_l2_l3", + "EventCode": "0x72", + "BriefDescription": "All L2 prefetches accepted by the L2 pipeline which miss the L2 and the L3 caches." + },
These events produce zero counts on Zen 2;
they need a "UMask": "0xff".
<snip>
Quoted 11 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +11
-0+ { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if1g", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches to a 1GB page.", + "PublicDescription": "The number of instruction fetches that miss in both the L1 and L2 TLBs.", + "UMask": "0x4" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if2m", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches to a 2MB page.",
tools/perf/pmu-events/arch/x86/amdzen2/cache.json line 278
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +10
-0+ "PublicDescription": "The number of instruction fetches that miss in both the L1 and L2 TLBs.", + "UMask": "0x2" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if4k", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches to a 4KB page.", + "PublicDescription": "The number of instruction fetches that miss in both the L1 and L2 TLBs.", + "UMask": "0x1" + },
The BriefDescription text needs to be concatenated to the PublicDescription text for all of the above events.
<snip>
tools/perf/pmu-events/arch/x86/amdzen2/cache.json
Quoted 6 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +6
-0+ { + "EventName": "ex_ret_cops", + "EventCode": "0xc1", + "BriefDescription": "Retired Uops.", + "PublicDescription": "The number of uOps retired. This includes all processor activity (instructions, exceptions, interrupts, microcode assists, etc.). The number of events logged per cycle can vary from 0 to 4." + },
This text is not up to date with the latest documents.
tools/perf/pmu-events/arch/x86/amdzen2/cache.json
Quoted 5 lines
tools/perf/pmu-events/arch/x86/amdzen2/cache.json new file +5
-0+ { + "EventName": "ex_ret_fus_brnch_inst", + "EventCode": "0x1d0", + "BriefDescription": "The number of fused retired branch instructions retired per cycle. The number of events logged per cycle can vary from 0 to 3." + }
This event's description text has been updated in the latest documents; please use that text instead.
Quoted 11 lines
tools/perf/pmu-events/arch/x86/amdzen2/floating-point.json new file +5
-0@@ -0,0 +1,128 @@ +[ + { + "EventName": "fpu_pipe_assignment.total", + "EventCode": "0x00", + "BriefDescription": "Total number of fp uOps.",
tools/perf/pmu-events/arch/x86/amdzen2/floating-point.json line 15
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/floating-point.json new file +10
-0+ "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS.", + "UMask": "0xf" + }, + { + "EventName": "fp_ret_sse_avx_ops.all", + "EventCode": "0x03", + "BriefDescription": "All FLOPS.", + "PublicDescription": "This is a retire-based event. The number of retired SSE/AVX FLOPS. The number of events logged per cycle can vary from 0 to 64. This event can count above 15.", + "UMask": "0xff" + },
The BriefDescription text needs to be concatenated to the PublicDescription text for all of the above events.
<snip>
Quoted 32 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +26
-0@@ -0,0 +1,349 @@ +[ + { + "EventName": "ls_bad_status2.stli_other", + "EventCode": "0x24", + "BriefDescription": "Non-forwardable conflict; used to reduce STLI's via software. All reasons.", + "PublicDescription": "Store To Load Interlock (STLI) are loads that were unable to complete because of a possible match with an older store, and the older store could not do STLF for some reason. There are a number of reasons why this occurs, and this perfmon organizes them into three major groups. ", + "UMask": "0x2" + }, + { + "EventName": "ls_locks.spec_lock_hi_spec", + "EventCode": "0x25", + "BriefDescription": "High speculative cacheable lock speculation succeeded.", + "PublicDescription": "Retired lock instructions.", + "UMask": "0x8" + }, + { + "EventName": "ls_locks.spec_lock_lo_spec", + "EventCode": "0x25", + "BriefDescription": "Low speculative cacheable lock speculation succeeded.", + "PublicDescription": "Retired lock instructions.", + "UMask": "0x4" + }, + { + "EventName": "ls_locks.non_spec_lock", + "EventCode": "0x25", + "BriefDescription": "Non-speculative lock succeeded.",
tools/perf/pmu-events/arch/x86/amdzen2/memory.json line 36
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +10
-0+ "PublicDescription": "Retired lock instructions.", + "UMask": "0x2" + }, + { + "EventName": "ls_locks.bus_lock", + "EventCode": "0x25", + "BriefDescription": "Comparable to legacy bus lock.", + "PublicDescription": "Retired lock instructions. Bus lock when a locked operations crosses a cache boundary or is done on an uncacheable memory type.", + "UMask": "0x1" + },
The BriefDescription text needs to be concatenated to the PublicDescription text for all of the above events.
tools/perf/pmu-events/arch/x86/amdzen2/memory.json line 45
Quoted 9 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +9
-0+ { + "EventName": "ls_ret_cl_flush", + "EventCode": "0x26", + "BriefDescription": "Number of retired CLFLUSH instructions." + }, + { + "EventName": "ls_ret_cpuid", + "EventCode": "0x27", + "BriefDescription": "Number of retired CLFLUSH instructions."
This text should read "The number of CPUID instructions retired."
Quoted 11 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +11
-0+ }, + { + "EventName": "ls_dispatch.ld_st_dispatch", + "EventCode": "0x29", + "BriefDescription": "Number of single ops that do load/store to an address.", + "PublicDescription": "Dispatch of a single op that performs a load from and store to the same memory address.", + "UMask": "0x4" + },> + { + "EventName": "ls_dispatch.store_dispatch", + "EventCode": "0x29", + "BriefDescription": "Number of stores dispatched.",
tools/perf/pmu-events/arch/x86/amdzen2/memory.json line 67
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +10
-0+ "PublicDescription": "Counts the number of operations dispatched to the LS unit. Unit Masks ADDed.", + "UMask": "0x2" + }, + { + "EventName": "ls_dispatch.ld_dispatch", + "EventCode": "0x29", + "BriefDescription": "Number of loads dispatched.", + "PublicDescription": "Counts the number of operations dispatched to the LS unit. Unit Masks ADDed.", + "UMask": "0x1" + },
The BriefDescription text needs to be concatenated to the PublicDescription text for all of the above events.
<snip>
Quoted 25 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +25
-0+ { + "EventName": "ls_refills_from_sys.ls_mabresp_rmt_dram", + "EventCode": "0x43", + "BriefDescription": "DRAM or IO from different die.", + "PublicDescription": "Demand Data Cache Fills by Data Source.", + "UMask": "0x40" + }, + { + "EventName": "ls_refills_from_sys.ls_mabresp_rmt_cache", + "EventCode": "0x43", + "BriefDescription": "Hit in cache; Remote CCX and the address's Home Node is on a different die.", + "PublicDescription": "Demand Data Cache Fills by Data Source.", + "UMask": "0x10" + }, + { + "EventName": "ls_refills_from_sys.ls_mabresp_lcl_dram", + "EventCode": "0x43", + "BriefDescription": "DRAM or IO from this thread's die.", + "PublicDescription": "Demand Data Cache Fills by Data Source.", + "UMask": "0x8" + }, + { + "EventName": "ls_refills_from_sys.ls_mabresp_lcl_cache", + "EventCode": "0x43", + "BriefDescription": "Hit in cache; local CCX (not Local L2), or Remote CCX and the address's Home Node is on this thread's die.",
tools/perf/pmu-events/arch/x86/amdzen2/memory.json line 151
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +10
-0+ "PublicDescription": "Demand Data Cache Fills by Data Source.", + "UMask": "0x2" + }, + { + "EventName": "ls_refills_from_sys.ls_mabresp_lcl_l2", + "EventCode": "0x43", + "BriefDescription": "Local L2 hit.", + "PublicDescription": "Demand Data Cache Fills by Data Source.", + "UMask": "0x1" + },
The BriefDescription text needs to be concatenated to the PublicDescription text for all of the above events.
Quoted 53 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +53
-0+ { + "EventName": "ls_l1_d_tlb_miss.all", + "EventCode": "0x45", + "BriefDescription": "L1 DTLB Miss or Reload off all sizes.", + "PublicDescription": "L1 DTLB Miss or Reload off all sizes.", + "UMask": "0xff" + }, + { + "EventName": "ls_l1_d_tlb_miss.tlb_reload_1g_l2_miss", + "EventCode": "0x45", + "BriefDescription": "L1 DTLB Miss of a page of 1G size.", + "PublicDescription": "L1 DTLB Miss of a page of 1G size.", + "UMask": "0x80" + }, + { + "EventName": "ls_l1_d_tlb_miss.tlb_reload_2m_l2_miss", + "EventCode": "0x45", + "BriefDescription": "L1 DTLB Miss of a page of 2M size.", + "PublicDescription": "L1 DTLB Miss of a page of 2M size.", + "UMask": "0x40" + }, + { + "EventName": "ls_l1_d_tlb_miss.tlb_reload_32k_l2_miss", + "EventCode": "0x45", + "BriefDescription": "L1 DTLB Miss of a page of 32K size.", + "PublicDescription": "L1 DTLB Miss of a page of 32K size.", + "UMask": "0x20" + }, + { + "EventName": "ls_l1_d_tlb_miss.tlb_reload_4k_l2_miss", + "EventCode": "0x45", + "BriefDescription": "L1 DTLB Miss of a page of 4K size.", + "PublicDescription": "L1 DTLB Miss of a page of 4K size.", + "UMask": "0x10" + }, + { + "EventName": "ls_l1_d_tlb_miss.tlb_reload_1g_l2_hit", + "EventCode": "0x45", + "BriefDescription": "L1 DTLB Reload of a page of 1G size.", + "PublicDescription": "L1 DTLB Reload of a page of 1G size.", + "UMask": "0x8" + }, + { + "EventName": "ls_l1_d_tlb_miss.tlb_reload_2m_l2_hit", + "EventCode": "0x45", + "BriefDescription": "L1 DTLB Reload of a page of 2M size.", + "PublicDescription": "L1 DTLB Reload of a page of 2M size.", + "UMask": "0x4" + }, + { + "EventName": "ls_l1_d_tlb_miss.tlb_reload_32k_l2_hit", + "EventCode": "0x45", + "BriefDescription": "L1 DTLB Reload of a page of 32K size.",
tools/perf/pmu-events/arch/x86/amdzen2/memory.json line 214
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +10
-0+ "PublicDescription": "L1 DTLB Reload of a page of 32K size.", + "UMask": "0x2" + }, + { + "EventName": "ls_l1_d_tlb_miss.tlb_reload_4k_l2_hit", + "EventCode": "0x45", + "BriefDescription": "L1 DTLB Reload of a page of 4K size.", + "PublicDescription": "L1 DTLB Reload of a page of 4K size.", + "UMask": "0x1" + },
The above are not up to date, e.g., unit mask 0x2 is now TlbReloadCoalescedPageHit.
Also, wherever BriefDescription equals PublicDescription, please only provide the BriefDescription.
Quoted 11 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +11
-0+ { + "EventName": "ls_pref_instr_disp.prefetch_nta", + "EventCode": "0x4b", + "BriefDescription": "Software Prefetch Instructions (PREFETCHNTA instruction) Dispatched.", + "PublicDescription": "Software Prefetch Instructions (PREFETCHNTA instruction) Dispatched.", + "UMask": "0x4" + }, + { + "EventName": "ls_pref_instr_disp.store_prefetch_w", + "EventCode": "0x4b", + "BriefDescription": "Software Prefetch Instructions (3DNow PREFETCHW instruction) Dispatched.",
tools/perf/pmu-events/arch/x86/amdzen2/memory.json line 254
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +10
-0+ "PublicDescription": "Software Prefetch Instructions (3DNow PREFETCHW instruction) Dispatched.", + "UMask": "0x2" + }, + { + "EventName": "ls_pref_instr_disp.load_prefetch_w", + "EventCode": "0x4b", + "BriefDescription": "Prefetch, Prefetch_T0_T1_T2.", + "PublicDescription": "Software Prefetch Instructions Dispatched. Prefetch, Prefetch_T0_T1_T2.", + "UMask": "0x1" + },
The text for the above events has been updated in the documents; please update it here, too.
Quoted 74 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +74
-0+ { + "EventName": "ls_inef_sw_pref.mab_mch_cnt", + "EventCode": "0x52", + "BriefDescription": "Software PREFETCH instruction saw a match on an already-allocated miss request buffer.", + "PublicDescription": "The number of software prefetches that did not fetch data outside of the processor core.", + "UMask": "0x2" + }, + { + "EventName": "ls_inef_sw_pref.data_pipe_sw_pf_dc_hit", + "EventCode": "0x52", + "BriefDescription": "Software PREFETCH instruction saw a DC hit.", + "PublicDescription": "The number of software prefetches that did not fetch data outside of the processor core.", + "UMask": "0x1" + }, + { + "EventName": "ls_sw_pf_dc_fill.ls_mabresp_rmt_dram", + "EventCode": "0x59", + "BriefDescription": "DRAM or IO from different die.", + "PublicDescription": "Software Prefetch Data Cache Fills by Data Source.", + "UMask": "0x40" + }, + { + "EventName": "ls_sw_pf_dc_fill.ls_mabresp_rmt_cache", + "EventCode": "0x59", + "BriefDescription": "Hit in cache; Remote CCX and the address's Home Node is on a different die.", + "PublicDescription": "Software Prefetch Data Cache Fills by Data Source.", + "UMask": "0x10" + }, + { + "EventName": "ls_sw_pf_dc_fill.ls_mabresp_lcl_dram", + "EventCode": "0x59", + "BriefDescription": "DRAM or IO from this thread's die.", + "PublicDescription": "Software Prefetch Data Cache Fills by Data Source.", + "UMask": "0x8" + }, + { + "EventName": "ls_sw_pf_dc_fill.ls_mabresp_lcl_cache", + "EventCode": "0x59", + "BriefDescription": "Hit in cache; local CCX (not Local L2), or Remote CCX and the address's Home Node is on this thread's die.", + "PublicDescription": "Software Prefetch Data Cache Fills by Data Source.", + "UMask": "0x2" + }, + { + "EventName": "ls_sw_pf_dc_fill.ls_mabresp_lcl_l2", + "EventCode": "0x59", + "BriefDescription": "Local L2 hit.", + "PublicDescription": "Software Prefetch Data Cache Fills by Data Source.", + "UMask": "0x1" + }, + { + "EventName": "ls_hw_pf_dc_fill.ls_mabresp_rmt_dram", + "EventCode": "0x5A", + "BriefDescription": "DRAM or IO from different die.", + "PublicDescription": "Hardware Prefetch Data Cache Fills by Data Source.", + "UMask": "0x40" + }, + { + "EventName": "ls_hw_pf_dc_fill.ls_mabresp_rmt_cache", + "EventCode": "0x5A", + "BriefDescription": "Hit in cache; Remote CCX and the address's Home Node is on a different die.", + "PublicDescription": "Hardware Prefetch Data Cache Fills by Data Source.", + "UMask": "0x10" + }, + { + "EventName": "ls_hw_pf_dc_fill.ls_mabresp_lcl_dram", + "EventCode": "0x5A", + "BriefDescription": "DRAM or IO from this thread's die.", + "PublicDescription": "Hardware Prefetch Data Cache Fills by Data Source.", + "UMask": "0x8" + }, + { + "EventName": "ls_hw_pf_dc_fill.ls_mabresp_lcl_cache", + "EventCode": "0x5A", + "BriefDescription": "Hit in cache; local CCX (not Local L2), or Remote CCX and the address's Home Node is on this thread's die.",
tools/perf/pmu-events/arch/x86/amdzen2/memory.json line 338
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +10
-0+ "PublicDescription": "Hardware Prefetch Data Cache Fills by Data Source.", + "UMask": "0x2" + }, + { + "EventName": "ls_hw_pf_dc_fill.ls_mabresp_lcl_l2", + "EventCode": "0x5A", + "BriefDescription": "Local L2 hit.", + "PublicDescription": "Hardware Prefetch Data Cache Fills by Data Source.", + "UMask": "0x1" + },
The BriefDescription text needs to be concatenated to the PublicDescription text for all of the above events.
Quoted 53 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +53
-0+ { + "EventName": "de_dis_dispatch_token_stalls1.fp_misc_rsrc_stall", + "EventCode": "0xae", + "BriefDescription": "FP Miscellaneous resource unavailable", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. RETIRE Tokens unavailable.", + "UMask": "0x80" + }, + { + "EventName": "de_dis_dispatch_token_stalls1.fp_sch_rsrc_stall", + "EventCode": "0xae", + "BriefDescription": "FP scheduler resource stall.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. RETIRE Tokens unavailable.", + "UMask": "0x40" + }, + { + "EventName": "de_dis_dispatch_token_stalls1.fp_reg_file_rsrc_stall", + "EventCode": "0xae", + "BriefDescription": "Floating point register file resource stall.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. RETIRE Tokens unavailable.", + "UMask": "0x20" + }, + { + "EventName": "de_dis_dispatch_token_stalls1.taken_branch_buffer_rsrc_stall", + "EventCode": "0xae", + "BriefDescription": "", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. RETIRE Tokens unavailable.", + "UMask": "0x10" + }, + { + "EventName": "de_dis_dispatch_token_stalls1.int_sched_misc_token_stall", + "EventCode": "0xae", + "BriefDescription": "Integer Scheduler miscellaneous resource stall.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. RETIRE Tokens unavailable.", + "UMask": "0x8" + }, + { + "EventName": "de_dis_dispatch_token_stalls1.store_queue_token_stall", + "EventCode": "0xae", + "BriefDescription": "Store queue resource stall.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. RETIRE Tokens unavailable.", + "UMask": "0x4" + }, + { + "EventName": "de_dis_dispatch_token_stalls1.load_queue_token_stall", + "EventCode": "0xae", + "BriefDescription": "Load queue resource stall.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. RETIRE Tokens unavailable.", + "UMask": "0x2" + }, + { + "EventName": "de_dis_dispatch_token_stalls1.int_phy_reg_file_token_stall", + "EventCode": "0xae", + "BriefDescription": "Integer Physical Register File resource stall.",
tools/perf/pmu-events/arch/x86/amdzen2/memory.json line 332
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +10
-0+ "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. RETIRE Tokens unavailable.", + "UMask": "0x1" + }, + { + "EventName": "de_dis_dispatch_token_stalls0.sc_agu_dispatch_stall", + "EventCode": "0xaf", + "BriefDescription": "SC AGU dispatch stall.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. RETIRE Tokens unavailable.", + "UMask": "0x80" + },
All the above Public descriptions have "RETIRE Tokens unavailable." yet their BriefDescriptions are different. Please fix.
Quoted 32 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +32
-0+ { + "EventName": "de_dis_dispatch_token_stalls0.agsq_token_stall", + "EventCode": "0xaf", + "BriefDescription": "AGSQ Tokens unavailable.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. AGSQ Tokens unavailable.", + "UMask": "0x20" + }, + { + "EventName": "de_dis_dispatch_token_stalls0.alu_token_stall", + "EventCode": "0xaf", + "BriefDescription": "ALU tokens total unavailable.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. ALU tokens total unavailable.", + "UMask": "0x10" + }, + { + "EventName": "de_dis_dispatch_token_stalls0.alsq3_0_token_stall", + "EventCode": "0xaf", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall.", + "UMask": "0x8" + }, + { + "EventName": "de_dis_dispatch_token_stalls0.alsq3_token_stall", + "EventCode": "0xaf", + "BriefDescription": "ALSQ 3 Tokens unavailable.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. ALSQ 3 Tokens unavailable.", + "UMask": "0x4" + }, + { + "EventName": "de_dis_dispatch_token_stalls0.alsq2_token_stall", + "EventCode": "0xaf", + "BriefDescription": "ALSQ 2 Tokens unavailable.",
tools/perf/pmu-events/arch/x86/amdzen2/memory.json
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +10
-0+ "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. ALSQ 2 Tokens unavailable.", + "UMask": "0x2" + }, + { + "EventName": "de_dis_dispatch_token_stalls0.alsq1_token_stall", + "EventCode": "0xaf", + "BriefDescription": "ALSQ 1 Tokens unavailable.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. ALSQ 1 Tokens unavailable.", + "UMask": "0x1" + }
All the above events have updated text in the documents; please update the text here too.
Patch 1 of 3 looks OK to me. Assuming there are no further comments to this version, please make the requested changes to patches 2 and 3 of the series, and resend as a v3.
Thanks!
Kim
Re: [PATCH v2 2/3] perf vendor events amd: add Zen2 events
Quoted 13 lines
Quoted 13 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +13
-0+ { + "EventName": "ls_pref_instr_disp.prefetch_nta", + "EventCode": "0x4b", + "BriefDescription": "Software Prefetch Instructions (PREFETCHNTA instruction) Dispatched.", + "PublicDescription": "Software Prefetch Instructions (PREFETCHNTA instruction) Dispatched.", + "UMask": "0x4" + }, + { + "EventName": "ls_pref_instr_disp.store_prefetch_w", + "EventCode": "0x4b", + "BriefDescription": "Software Prefetch Instructions (3DNow PREFETCHW instruction) Dispatched.", + "PublicDescription": "Software Prefetch Instructions (3DNow PREFETCHW instruction) Dispatched.", + "UMask": "0x2"
Quoted 8 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json line 254
Quoted 8 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +8
-0+ }, + { + "EventName": "ls_pref_instr_disp.load_prefetch_w", + "EventCode": "0x4b", + "BriefDescription": "Prefetch, Prefetch_T0_T1_T2.", + "PublicDescription": "Software Prefetch Instructions Dispatched. Prefetch, Prefetch_T0_T1_T2.", + "UMask": "0x1" + },
These three are present in the PPR for model 71h (56176 Rev 3.06 - Jul 17, 2019) but are missing from the PPR for model 31h (55803 Rev 0.54 - Sep 12, 2019). Not sure what to do about it.
Similarly, PMC 0x0AF - Dispatch Resource Stall Cycles 0 only has one subcounter in the model 31h PPR, whereas the PPR for 71h is the one that contains the eight subcounters we see in the mainline right now.
There could be more subtle differences like these, since I have not really compared the PPR versions that thoroughly. I was going with the assumption that since both are for SoCs based on the Zen2, they would have identical events.
Otherwise, I have made all the other changes and corrections, and will send in v3 after you suggest how to proceed about the above two.
Best,
Vijay
Re: [PATCH v2 2/3] perf vendor events amd: add Zen2 events
Quoted 21 lines · Vijay Thakkar
Quoted 13 lines
Quoted 13 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +13
-0+ { + "EventName": "ls_pref_instr_disp.prefetch_nta", + "EventCode": "0x4b", + "BriefDescription": "Software Prefetch Instructions (PREFETCHNTA instruction) Dispatched.", + "PublicDescription": "Software Prefetch Instructions (PREFETCHNTA instruction) Dispatched.", + "UMask": "0x4" + }, + { + "EventName": "ls_pref_instr_disp.store_prefetch_w", + "EventCode": "0x4b", + "BriefDescription": "Software Prefetch Instructions (3DNow PREFETCHW instruction) Dispatched.", + "PublicDescription": "Software Prefetch Instructions (3DNow PREFETCHW instruction) Dispatched.", + "UMask": "0x2"Quoted 8 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json line 254
Quoted 8 lines
tools/perf/pmu-events/arch/x86/amdzen2/memory.json new file +8
-0+ }, + { + "EventName": "ls_pref_instr_disp.load_prefetch_w", + "EventCode": "0x4b", + "BriefDescription": "Prefetch, Prefetch_T0_T1_T2.", + "PublicDescription": "Software Prefetch Instructions Dispatched. Prefetch, Prefetch_T0_T1_T2.", + "UMask": "0x1" + },
Quoted 3 lines
These three are present in the PPR for model 71h (56176 Rev 3.06 - Jul 17, 2019) but are missing from the PPR for model 31h (55803 Rev 0.54 - Sep 12, 2019). Not sure what to do about it.
They're producing nonzero counts on my model 31h, so leave them in?
Quoted 3 lines
Similarly, PMC
0x0AF- Dispatch Resource Stall Cycles 0 only has one subcounter in the model 31h PPR, whereas the PPR for 71h is the one that contains the eight subcounters we see in the mainline right now.
I'm getting nonzero values on my model 31h for that event's various unit masks, too.
Quoted 4 lines
There could be more subtle differences like these, since I have not really compared the PPR versions that thoroughly. I was going with the assumption that since both are for SoCs based on the Zen2, they would have identical events.
I think that's a reasonable assumption.
Quoted 2 lines
Otherwise, I have made all the other changes and corrections, and will send in v3 after you suggest how to proceed about the above two.
Thanks, I'd veer toward making them available despite differences in PPR versions.
Thanks,
Kim
Re: [PATCH v2 2/3] perf vendor events amd: add Zen2 events
Quoted 4 lines
They're producing nonzero counts on my model 31h, so leave them in?
I'm getting nonzero values on my model 31h for that event's various unit masks, too.
Okay, will do.
Quoted 2 lines
Thanks, I'd veer toward making them available despite differences in PPR versions.
Okay, that is consistent with what I have done so far for the Zen1 counters that are not mentioned in the Zen2 PPRs. Great! I will send v3 in a bit.
Best,
Vijay
Re: [PATCH v2 2/3] perf vendor events amd: add Zen2 events
In reply to Kim PhillipsQuoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen2/other.json line 87
Quoted 7 lines
tools/perf/pmu-events/arch/x86/amdzen2/other.json new file +7
-0+ { + "EventName": "de_dis_dispatch_token_stalls0.sc_agu_dispatch_stall", + "EventCode": "0xaf", + "BriefDescription": "SC AGU dispatch stall.", + "PublicDescription": "Cycles where a dispatch group is valid but does not get dispatched due to a token stall. RETIRE Tokens unavailable.", + "UMask": "0x80" + },All the above Public descriptions have "RETIRE Tokens unavailable." yet their BriefDescriptions are different. Please fix.
Just noticed that this one is not present at all in PPR 56176 Rev 3.06 - Jul 17, 2019 and that the umasks for the rest of the sub-counters in PMC0xAF are right shifted by one when compared to those in Zen1. As a result, the previous counter at umask 0x1 is no longer present.
I will update this counter to reflect what is documented in model 71h PPR 56176 Rev 3.06 - Jul 17, 2019.
-Vijay
PATCH v2 3/3 perf vendor events amd: update Zen1 events to V2
In reply to Vijay ThakkarThis patch updates the PMCs for AMD Zen1 core based processors (Family 17h; Models 0 through 2F) to be in accordance with PMCs as documented in the latest versions of the AMD Processor Programming Reference [1] and [2].
PMCs added:
fpu_pipe_assignment.dual{0|1|2|3}
fpu_pipe_assignment.total{0|1|2|3}
ls_mab_alloc.dc_prefetcher
ls_mab_alloc.stores
ls_mab_alloc.loadsbp_dyn_ind_predbp_de_redirect
PMC removed:ex_ret_cond_misp
Cumulative counts, fpu_pipe_assignment.total and fpu_pipe_assignment.dual, existed in v1, but did expose port-level counters.
ex_ret_cond_misp has been removed as it has been removed from the latest versions of the PPR, and when tested, always seems to sample zero as tested on a Ryzen 3400G system.
[1]: Processor Programming Reference (PPR) for AMD Family 17h Models 01h,08h, Revision B2 Processors, 54945 Rev 3.03 - Jun 14, 2019. [2]: Processor Programming Reference (PPR) for AMD Family 17h Model 18h, Revision B1 Processors, 55570-B1 Rev 3.14 - Sep 26, 2019. All of the PPRs can be found at:
https://bugzilla.kernel.org/show_bug.cgi?id=206537
---
Changes in v2:
- Correct the UMasks for fpu_pipe_assignment.dual* by left shifting all by 4 bits.
- Correct UMask for ls_mab_alloc.loads
- add bp_dyn_ind_pred (PMC0x08E)
- add bp_de_redirect (PMC0x091)
.../pmu-events/arch/x86/amdzen1/branch.json | 11 ++++ .../pmu-events/arch/x86/amdzen1/core.json | 5 -- .../arch/x86/amdzen1/floating-point.json | 56 +++++++++++++++++++ .../pmu-events/arch/x86/amdzen1/memory.json | 18 ++++++ tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 5 files changed, 86 insertions(+), 6 deletions(-)
tools/perf/pmu-events/arch/x86/amdzen1/branch.json +11 -0
@@ -8,5 +8,16 @@ "EventName": "bp_l2_btb_correct", "EventCode": "0x8b", "BriefDescription": "L2 BTB Correction." + }, + { + "EventName": "bp_dyn_ind_pred", + "EventCode": "0x8e", + "BriefDescription": "Dynamic Indirect Predictions.", + "PublicDescription": "Indirect Branch Prediction for potential multi-target branch (speculative)." + }, + { + "EventName": "bp_de_redirect", + "EventCode": "0x91", + "BriefDescription": "Decoder Overrides Existing Branch Prediction (speculative)." } ]
tools/perf/pmu-events/arch/x86/amdzen1/core.json +0 -5
@@ -90,11 +90,6 @@ "EventCode": "0xd1", "BriefDescription": "Retired Conditional Branch Instructions." }, - { - "EventName": "ex_ret_cond_misp", - "EventCode": "0xd2", - "BriefDescription": "Retired Conditional Branch Instructions Mispredicted." - }, { "EventName": "ex_div_busy", "EventCode": "0xd3",
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json +56 -0
68 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/amdzen1/memory.json +18 -0
@@ -37,6 +37,24 @@ "EventCode": "0x40", "BriefDescription": "The number of accesses to the data cache for load and store references. This may include certain microcode scratchpad accesses, although these are generally rare. Each increment represents an eight-byte access, although the instruction may only be accessing a portion of that. This event is a speculative event." }, + { + "EventName": "ls_mab_alloc.dc_prefetcher", + "EventCode": "0x41", + "BriefDescription": "Data cache prefetcher miss.", + "UMask": "0x8" + }, + { + "EventName": "ls_mab_alloc.stores", + "EventCode": "0x41", + "BriefDescription": "Data cache store miss.", + "UMask": "0x2" + }, + { + "EventName": "ls_mab_alloc.loads", + "EventCode": "0x41", + "BriefDescription": "Data cache load miss.", + "UMask": "0x01" + }, { "EventName": "ls_l1_d_tlb_miss.all", "EventCode": "0x45",
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -1
@@ -36,5 +36,5 @@ GenuineIntel-6-55-[56789ABCDEF],v1,cascadelakex,core GenuineIntel-6-7D,v1,icelake,core GenuineIntel-6-7E,v1,icelake,core GenuineIntel-6-86,v1,tremontx,core -AuthenticAMD-23-([12][0-9A-F]|[0-9A-F]),v1,amdzen1,core +AuthenticAMD-23-([12][0-9A-F]|[0-9A-F]),v2,amdzen1,core AuthenticAMD-23-[[:xdigit:]]+,v1,amdzen2,core
Signature · 1 line
2.25.1
Re: [PATCH v2 3/3] perf vendor events amd: update Zen1 events to V2
Hi Vijay,
Thanks for your resubmission.
Quoted 4 lines · Vijay Thakkar
[1]: Processor Programming Reference (PPR) for AMD Family 17h Models 01h,08h, Revision B2 Processors, 54945 Rev 3.03 - Jun 14, 2019. [2]: Processor Programming Reference (PPR) for AMD Family 17h Model 18h, Revision B1 Processors, 55570-B1 Rev 3.14 - Sep 26, 2019.
Events such as the FPU pipe assignment ones are not included in the above docs. So can you add this one to your list of references, since it has them listed?:
OSRR for AMD Family 17h processors, Models 00h-2Fh, 56255 Rev 3.03 - July, 2018
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json line 6
Quoted 3 lines
+++
b/tools/perf/pmu-events/arch/x86/amdzen1/floating-point.jsontools/perf/pmu-events/arch/x86/amdzen1/floating-point.json +0
-0@@ -6,6 +6,34 @@ "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number multi-pipe uOps assigned to Pipe 3.",
Omit the trailing " to Pipe 3.", since this one's umask represents all pipes. Feel free to add "all pipes" instead. I realize this isn't a line you're adding, but since we're here, we might as well fix it.
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json
Quoted 7 lines
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json +5
-0"UMask": "0xf0" }, + { + "EventName": "fpu_pipe_assignment.dual3", + "EventCode": "0x00", + "BriefDescription": "Total number multi-pipe uOps to pipe 3.", + "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number multi-pipe uOps assigned to Pipe 3."
This one is ok.
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json line 20
Quoted 7 lines
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json +7
-0+ "UMask": "0x80" + }, + { + "EventName": "fpu_pipe_assignment.dual2", + "EventCode": "0x00", + "BriefDescription": "Total number multi-pipe uOps to pipe 2.", + "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number multi-pipe uOps assigned to Pipe 3.",
That trailing part of the string should say ..." to Pipe 2." , not Pipe 3.
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json line 29
Quoted 9 lines
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json +9
-0+ "UMask": "0x40" + }, + { + "EventName": "fpu_pipe_assignment.dual1", + "EventCode": "0x00", + "BriefDescription": "Total number multi-pipe uOps to pipe 1.", + "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number multi-pipe uOps assigned to Pipe 3.", + "UMask": "0x20" + },
That trailing part of the string should say ..." to Pipe 1." , not Pipe 3.
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json line 34
Quoted 5 lines
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json +5
-0+ { + "EventName": "fpu_pipe_assignment.dual0", + "EventCode": "0x00", + "BriefDescription": "Total number multi-pipe uOps to pipe 0.", + "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number multi-pipe uOps assigned to Pipe 3.",
That trailing part of the string should say ..." to Pipe 0." , not Pipe 3.
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json line 41
Quoted 7 lines
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json +2
-0+ "UMask": "0x10" + }, { "EventName": "fpu_pipe_assignment.total", "EventCode": "0x00",@@ -13,6 +41,34 @@ "PublicDescription": "The number of operations (uOps) and dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to Pipe 3.",
Omit the trailing " to Pipe 3.", since this one's umask represents all pipes.
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json line 48
Quoted 7 lines
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json +5
-0"UMask": "0xf" }, + { + "EventName": "fpu_pipe_assignment.total3", + "EventCode": "0x00", + "BriefDescription": "Total number of fp uOps on pipe 3.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS.",
Please concatenate " Total3: Total number uOps assigned to Pipe 3." to the above string.
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json line 55
Quoted 7 lines
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json +7
-0+ "UMask": "0x8" + }, + { + "EventName": "fpu_pipe_assignment.total2", + "EventCode": "0x00", + "BriefDescription": "Total number of fp uOps on pipe 2.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS.",
same here, but for pipe 2.
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json line 62
Quoted 7 lines
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json +7
-0+ "UMask": "0x4" + }, + { + "EventName": "fpu_pipe_assignment.total1", + "EventCode": "0x00", + "BriefDescription": "Total number of fp uOps on pipe 1.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS.",
and here.
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json line 71
Quoted 9 lines
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json +9
-0+ "UMask": "0x2" + }, + { + "EventName": "fpu_pipe_assignment.total0", + "EventCode": "0x00", + "BriefDescription": "Total number of fp uOps on pipe 0.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS.", + "UMask": "0x1" + },
and here.
Quoted 13 lines
tools/perf/pmu-events/arch/x86/amdzen1/memory.json +9
-0+++ b/tools/perf/pmu-events/arch/x86/amdzen1/memory.json@@ -37,6 +37,24 @@ "EventCode": "0x40", "BriefDescription": "The number of accesses to the data cache for load and store references. This may include certain microcode scratchpad accesses, although these are generally rare. Each increment represents an eight-byte access, although the instruction may only be accessing a portion of that. This event is a speculative event." }, + { + "EventName": "ls_mab_alloc.dc_prefetcher", + "EventCode": "0x41", + "BriefDescription": "Data cache prefetcher miss.", + "UMask": "0x8" + }, + { + "EventName": "ls_mab_alloc.stores",
tools/perf/pmu-events/arch/x86/amdzen1/memory.json line 57
Quoted 10 lines
tools/perf/pmu-events/arch/x86/amdzen1/memory.json +10
-0+ "EventCode": "0x41", + "BriefDescription": "Data cache store miss.", + "UMask": "0x2" + }, + { + "EventName": "ls_mab_alloc.loads", + "EventCode": "0x41", + "BriefDescription": "Data cache load miss.", + "UMask": "0x01" + },
Hm, PMCx041 didn't exist when I wrote commit 0e3b74e26280 "perf/x86/amd: Update generic hardware cache events for Family 17h", and their counts don't seem to match up very well when running various workloads. The microarchitecture is likely to have changed in this area from families prior to 17h, so a MAB alloc can likely count different events than what is presumed here: a Data cache load/store/prefetch miss.
I think it's safer to just leave the PPR text "LS MAB Allocates by Type" as-is, instead of assuming they are L1 load/store misses. What do you think?
I'll review patches 1-2 tomorrow.
Thanks,
Kim
Re: [PATCH v2 3/3] perf vendor events amd: update Zen1 events to V2
Quoted 1 line
OSRR for AMD Family 17h processors, Models 00h-2Fh, 56255 Rev 3.03 - July, 2018
I have included this for v3 that I will submit later, including all the changes for the FPU counters. Sorry, I messed up copy-pasting the text and forgot to change the trailing pipe number.
Quoted 9 lines
and their counts don't seem to match up very well when running various workloads. The microarchitecture is likely to have changed in this area from families prior to 17h, so a MAB alloc can likely count different events than what is presumed here: a Data cache load/store/prefetch miss.
I think it's safer to just leave the PPR text "LS MAB Allocates by Type" as-is, instead of assuming they are L1 load/store misses. What do you think?
I did some checking accross PPRs, and this counter seems to have changed names multiple times throughout the PPR revisions.
Zen1 PPR (54945 Rev 1.14 - April 15, 2017) lists counter called "LsMabAllocPipe" with 5 subcounters that have different names compared to ones we see in the mainline right now. PPRs for stepping B2
onwards change this to the 3 sub-counter and primary counter name we see right now. This public description still changes accross various PPR revisions, which is why I had this set to what it was. The lastest PPR I can find is indeed lists it as "LS MAB Allocates by Type";
I will change it to that with the fuffix of tehe sub-counter name. Since the same counter is in Zen2 as well, I will make the same changes there too.
Let me know if this sounds good to you!
Best,
Vijay
Re: [PATCH v2 3/3] perf vendor events amd: update Zen1 events to V2
Quoted 4 lines · Vijay Thakkar
Quoted 1 line
OSRR for AMD Family 17h processors, Models 00h-2Fh, 56255 Rev 3.03 - July, 2018
I have included this for v3 that I will submit later, including all the changes for the FPU counters. Sorry, I messed up copy-pasting the text and forgot to change the trailing pipe number.
Please also look at addressing the review comments for patch 2 of 3.
Quoted 13 lines
Quoted 9 lines
and their counts don't seem to match up very well when running various workloads. The microarchitecture is likely to have changed in this area from families prior to 17h, so a MAB alloc can likely count different events than what is presumed here: a Data cache load/store/prefetch miss.
I think it's safer to just leave the PPR text "LS MAB Allocates by Type" as-is, instead of assuming they are L1 load/store misses. What do you think?
I did some checking accross PPRs, and this counter seems to have changed names multiple times throughout the PPR revisions.
Quoted 10 lines
Zen1 PPR (54945 Rev 1.14 - April 15, 2017) lists counter called "LsMabAllocPipe" with 5 subcounters that have different names compared to ones we see in the mainline right now. PPRs for stepping B2
onwards change this to the 3 sub-counter and primary counter name we see right now. This public description still changes accross various PPR revisions, which is why I had this set to what it was. The lastest PPR I can find is indeed lists it as "LS MAB Allocates by Type";
I will change it to that with the fuffix of tehe sub-counter name. Since the same counter is in Zen2 as well, I will make the same changes there too.
Thanks, yes, and if you look at the Software Optimization Guide that I just added to the bugzilla [1], Figure 7 "Load-Store Unit" on page 40 shows a MAB block separate from the Data Cache block.
Kim