linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf test attr: Add back missing topdown events
@ 2024-01-22 21:38 vmolnaro
  2024-01-22 22:01 ` Ian Rogers
  0 siblings, 1 reply; 10+ messages in thread
From: vmolnaro @ 2024-01-22 21:38 UTC (permalink / raw)
  To: linux-perf-users, acme, acme, vmolnaro; +Cc: mpetlan, irogers

From: Veronika Molnarova <vmolnaro@redhat.com>

With the patch 0b6c5371c03c "Add missing topdown metrics events" eight
topdown metric events with numbers ranging from 0x8000 to 0x8700 were
added to the test since they were added as 'perf stat' default events.
Later the patch 951efb9976ce "Update no event/metric expectations" kept
only 4 of those events(0x8000-0x8300).

Currently, the topdown events with numbers 0x8400 to 0x8700 are missing
from the list of expected events resulting in a failure. Add back the
missing topdown events.

Fixes: 951efb9976ce ("perf test attr: Update no event/metric expectations")
Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
---
 tools/perf/tests/attr/test-stat-default    |  90 ++++++++++----
 tools/perf/tests/attr/test-stat-detailed-1 | 106 +++++++++++-----
 tools/perf/tests/attr/test-stat-detailed-2 | 130 ++++++++++++-------
 tools/perf/tests/attr/test-stat-detailed-3 | 138 ++++++++++++++-------
 4 files changed, 320 insertions(+), 144 deletions(-)

diff --git a/tools/perf/tests/attr/test-stat-default b/tools/perf/tests/attr/test-stat-default
index a1e2da0a9a6d..e47fb4944679 100644
--- a/tools/perf/tests/attr/test-stat-default
+++ b/tools/perf/tests/attr/test-stat-default
@@ -88,98 +88,142 @@ enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
+# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
 [event13:base-stat]
 fd=13
 group_fd=11
 type=4
-config=33280
+config=33024
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-be-bound (0x8300)
+# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
 [event14:base-stat]
 fd=14
 group_fd=11
 type=4
-config=33536
+config=33280
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
+# PERF_TYPE_RAW / topdown-be-bound (0x8300)
 [event15:base-stat]
 fd=15
 group_fd=11
 type=4
-config=33024
+config=33536
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
+# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
 [event16:base-stat]
 fd=16
+group_fd=11
 type=4
-config=4109
+config=33792
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
+# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
 [event17:base-stat]
 fd=17
+group_fd=11
 type=4
-config=17039629
+config=34048
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
+# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
 [event18:base-stat]
 fd=18
+group_fd=11
 type=4
-config=60
+config=34304
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
+# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
 [event19:base-stat]
 fd=19
+group_fd=11
 type=4
-config=2097421
+config=34560
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
+# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
 [event20:base-stat]
 fd=20
 type=4
-config=316
+config=4109
 optional=1
 
-# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
 [event21:base-stat]
 fd=21
 type=4
-config=412
+config=17039629
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
 [event22:base-stat]
 fd=22
 type=4
-config=572
+config=60
 optional=1
 
-# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
 [event23:base-stat]
 fd=23
 type=4
-config=706
+config=2097421
 optional=1
 
-# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
 [event24:base-stat]
 fd=24
 type=4
+config=316
+optional=1
+
+# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+[event25:base-stat]
+fd=25
+type=4
+config=412
+optional=1
+
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+[event26:base-stat]
+fd=26
+type=4
+config=572
+optional=1
+
+# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+[event27:base-stat]
+fd=27
+type=4
+config=706
+optional=1
+
+# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+[event28:base-stat]
+fd=28
+type=4
 config=270
 optional=1
diff --git a/tools/perf/tests/attr/test-stat-detailed-1 b/tools/perf/tests/attr/test-stat-detailed-1
index 1c52cb05c900..3d500d3e0c5c 100644
--- a/tools/perf/tests/attr/test-stat-detailed-1
+++ b/tools/perf/tests/attr/test-stat-detailed-1
@@ -90,99 +90,143 @@ enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
+# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
 [event13:base-stat]
 fd=13
 group_fd=11
 type=4
-config=33280
+config=33024
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-be-bound (0x8300)
+# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
 [event14:base-stat]
 fd=14
 group_fd=11
 type=4
-config=33536
+config=33280
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
+# PERF_TYPE_RAW / topdown-be-bound (0x8300)
 [event15:base-stat]
 fd=15
 group_fd=11
 type=4
-config=33024
+config=33536
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
+# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
 [event16:base-stat]
 fd=16
+group_fd=11
 type=4
-config=4109
+config=33792
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
+# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
 [event17:base-stat]
 fd=17
+group_fd=11
 type=4
-config=17039629
+config=34048
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
+# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
 [event18:base-stat]
 fd=18
+group_fd=11
 type=4
-config=60
+config=34304
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
+# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
 [event19:base-stat]
 fd=19
+group_fd=11
 type=4
-config=2097421
+config=34560
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
+# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
 [event20:base-stat]
 fd=20
 type=4
-config=316
+config=4109
 optional=1
 
-# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
 [event21:base-stat]
 fd=21
 type=4
-config=412
+config=17039629
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
 [event22:base-stat]
 fd=22
 type=4
-config=572
+config=60
 optional=1
 
-# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
 [event23:base-stat]
 fd=23
 type=4
-config=706
+config=2097421
 optional=1
 
-# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
 [event24:base-stat]
 fd=24
 type=4
+config=316
+optional=1
+
+# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+[event25:base-stat]
+fd=25
+type=4
+config=412
+optional=1
+
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+[event26:base-stat]
+fd=26
+type=4
+config=572
+optional=1
+
+# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+[event27:base-stat]
+fd=27
+type=4
+config=706
+optional=1
+
+# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+[event28:base-stat]
+fd=28
+type=4
 config=270
 optional=1
 
@@ -190,8 +234,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event25:base-stat]
-fd=25
+[event29:base-stat]
+fd=29
 type=3
 config=0
 optional=1
@@ -200,8 +244,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event26:base-stat]
-fd=26
+[event30:base-stat]
+fd=30
 type=3
 config=65536
 optional=1
@@ -210,8 +254,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event27:base-stat]
-fd=27
+[event31:base-stat]
+fd=31
 type=3
 config=2
 optional=1
@@ -220,8 +264,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event28:base-stat]
-fd=28
+[event32:base-stat]
+fd=32
 type=3
 config=65538
 optional=1
diff --git a/tools/perf/tests/attr/test-stat-detailed-2 b/tools/perf/tests/attr/test-stat-detailed-2
index 7e961d24a885..01777a63752f 100644
--- a/tools/perf/tests/attr/test-stat-detailed-2
+++ b/tools/perf/tests/attr/test-stat-detailed-2
@@ -90,99 +90,143 @@ enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
+# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
 [event13:base-stat]
 fd=13
 group_fd=11
 type=4
-config=33280
+config=33024
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-be-bound (0x8300)
+# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
 [event14:base-stat]
 fd=14
 group_fd=11
 type=4
-config=33536
+config=33280
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
+# PERF_TYPE_RAW / topdown-be-bound (0x8300)
 [event15:base-stat]
 fd=15
 group_fd=11
 type=4
-config=33024
+config=33536
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
+# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
 [event16:base-stat]
 fd=16
+group_fd=11
 type=4
-config=4109
+config=33792
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
+# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
 [event17:base-stat]
 fd=17
+group_fd=11
 type=4
-config=17039629
+config=34048
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
+# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
 [event18:base-stat]
 fd=18
+group_fd=11
 type=4
-config=60
+config=34304
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
+# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
 [event19:base-stat]
 fd=19
+group_fd=11
 type=4
-config=2097421
+config=34560
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
+# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
 [event20:base-stat]
 fd=20
 type=4
-config=316
+config=4109
 optional=1
 
-# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
 [event21:base-stat]
 fd=21
 type=4
-config=412
+config=17039629
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
 [event22:base-stat]
 fd=22
 type=4
-config=572
+config=60
 optional=1
 
-# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
 [event23:base-stat]
 fd=23
 type=4
-config=706
+config=2097421
 optional=1
 
-# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
 [event24:base-stat]
 fd=24
 type=4
+config=316
+optional=1
+
+# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+[event25:base-stat]
+fd=25
+type=4
+config=412
+optional=1
+
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+[event26:base-stat]
+fd=26
+type=4
+config=572
+optional=1
+
+# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+[event27:base-stat]
+fd=27
+type=4
+config=706
+optional=1
+
+# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+[event28:base-stat]
+fd=28
+type=4
 config=270
 optional=1
 
@@ -190,8 +234,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event25:base-stat]
-fd=25
+[event29:base-stat]
+fd=29
 type=3
 config=0
 optional=1
@@ -200,8 +244,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event26:base-stat]
-fd=26
+[event30:base-stat]
+fd=30
 type=3
 config=65536
 optional=1
@@ -210,8 +254,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event27:base-stat]
-fd=27
+[event31:base-stat]
+fd=31
 type=3
 config=2
 optional=1
@@ -220,8 +264,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event28:base-stat]
-fd=28
+[event32:base-stat]
+fd=32
 type=3
 config=65538
 optional=1
@@ -230,8 +274,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event29:base-stat]
-fd=29
+[event33:base-stat]
+fd=33
 type=3
 config=1
 optional=1
@@ -240,8 +284,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event30:base-stat]
-fd=30
+[event34:base-stat]
+fd=34
 type=3
 config=65537
 optional=1
@@ -250,8 +294,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event31:base-stat]
-fd=31
+[event35:base-stat]
+fd=35
 type=3
 config=3
 optional=1
@@ -260,8 +304,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event32:base-stat]
-fd=32
+[event36:base-stat]
+fd=36
 type=3
 config=65539
 optional=1
@@ -270,8 +314,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event33:base-stat]
-fd=33
+[event37:base-stat]
+fd=37
 type=3
 config=4
 optional=1
@@ -280,8 +324,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event34:base-stat]
-fd=34
+[event38:base-stat]
+fd=38
 type=3
 config=65540
 optional=1
diff --git a/tools/perf/tests/attr/test-stat-detailed-3 b/tools/perf/tests/attr/test-stat-detailed-3
index e50535f45977..8400abd7e1e4 100644
--- a/tools/perf/tests/attr/test-stat-detailed-3
+++ b/tools/perf/tests/attr/test-stat-detailed-3
@@ -90,99 +90,143 @@ enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
+# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
 [event13:base-stat]
 fd=13
 group_fd=11
 type=4
-config=33280
+config=33024
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-be-bound (0x8300)
+# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
 [event14:base-stat]
 fd=14
 group_fd=11
 type=4
-config=33536
+config=33280
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
+# PERF_TYPE_RAW / topdown-be-bound (0x8300)
 [event15:base-stat]
 fd=15
 group_fd=11
 type=4
-config=33024
+config=33536
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
+# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
 [event16:base-stat]
 fd=16
+group_fd=11
 type=4
-config=4109
+config=33792
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
+# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
 [event17:base-stat]
 fd=17
+group_fd=11
 type=4
-config=17039629
+config=34048
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
+# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
 [event18:base-stat]
 fd=18
+group_fd=11
 type=4
-config=60
+config=34304
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
+# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
 [event19:base-stat]
 fd=19
+group_fd=11
 type=4
-config=2097421
+config=34560
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
+# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
 [event20:base-stat]
 fd=20
 type=4
-config=316
+config=4109
 optional=1
 
-# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
 [event21:base-stat]
 fd=21
 type=4
-config=412
+config=17039629
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
 [event22:base-stat]
 fd=22
 type=4
-config=572
+config=60
 optional=1
 
-# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
 [event23:base-stat]
 fd=23
 type=4
-config=706
+config=2097421
 optional=1
 
-# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
 [event24:base-stat]
 fd=24
 type=4
+config=316
+optional=1
+
+# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+[event25:base-stat]
+fd=25
+type=4
+config=412
+optional=1
+
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+[event26:base-stat]
+fd=26
+type=4
+config=572
+optional=1
+
+# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+[event27:base-stat]
+fd=27
+type=4
+config=706
+optional=1
+
+# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+[event28:base-stat]
+fd=28
+type=4
 config=270
 optional=1
 
@@ -190,8 +234,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event25:base-stat]
-fd=25
+[event29:base-stat]
+fd=29
 type=3
 config=0
 optional=1
@@ -200,8 +244,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event26:base-stat]
-fd=26
+[event30:base-stat]
+fd=30
 type=3
 config=65536
 optional=1
@@ -210,8 +254,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event27:base-stat]
-fd=27
+[event31:base-stat]
+fd=31
 type=3
 config=2
 optional=1
@@ -220,8 +264,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event28:base-stat]
-fd=28
+[event32:base-stat]
+fd=32
 type=3
 config=65538
 optional=1
@@ -230,8 +274,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event29:base-stat]
-fd=29
+[event33:base-stat]
+fd=33
 type=3
 config=1
 optional=1
@@ -240,8 +284,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event30:base-stat]
-fd=30
+[event34:base-stat]
+fd=34
 type=3
 config=65537
 optional=1
@@ -250,8 +294,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event31:base-stat]
-fd=31
+[event35:base-stat]
+fd=35
 type=3
 config=3
 optional=1
@@ -260,8 +304,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event32:base-stat]
-fd=32
+[event36:base-stat]
+fd=36
 type=3
 config=65539
 optional=1
@@ -270,8 +314,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event33:base-stat]
-fd=33
+[event37:base-stat]
+fd=37
 type=3
 config=4
 optional=1
@@ -280,8 +324,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event34:base-stat]
-fd=34
+[event38:base-stat]
+fd=38
 type=3
 config=65540
 optional=1
@@ -290,8 +334,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event35:base-stat]
-fd=35
+[event39:base-stat]
+fd=39
 type=3
 config=512
 optional=1
@@ -300,8 +344,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event36:base-stat]
-fd=36
+[event40:base-stat]
+fd=40
 type=3
 config=66048
 optional=1
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf test attr: Add back missing topdown events
  2024-01-22 21:38 [PATCH] perf test attr: Add back missing topdown events vmolnaro
@ 2024-01-22 22:01 ` Ian Rogers
  2024-01-26 15:14   ` Michael Petlan
  0 siblings, 1 reply; 10+ messages in thread
From: Ian Rogers @ 2024-01-22 22:01 UTC (permalink / raw)
  To: vmolnaro; +Cc: linux-perf-users, acme, acme, mpetlan

On Mon, Jan 22, 2024 at 1:39 PM <vmolnaro@redhat.com> wrote:
>
> From: Veronika Molnarova <vmolnaro@redhat.com>
>
> With the patch 0b6c5371c03c "Add missing topdown metrics events" eight
> topdown metric events with numbers ranging from 0x8000 to 0x8700 were
> added to the test since they were added as 'perf stat' default events.
> Later the patch 951efb9976ce "Update no event/metric expectations" kept
> only 4 of those events(0x8000-0x8300).
>
> Currently, the topdown events with numbers 0x8400 to 0x8700 are missing
> from the list of expected events resulting in a failure. Add back the
> missing topdown events.
>
> Fixes: 951efb9976ce ("perf test attr: Update no event/metric expectations")
> Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
> ---
>  tools/perf/tests/attr/test-stat-default    |  90 ++++++++++----
>  tools/perf/tests/attr/test-stat-detailed-1 | 106 +++++++++++-----
>  tools/perf/tests/attr/test-stat-detailed-2 | 130 ++++++++++++-------
>  tools/perf/tests/attr/test-stat-detailed-3 | 138 ++++++++++++++-------
>  4 files changed, 320 insertions(+), 144 deletions(-)
>
> diff --git a/tools/perf/tests/attr/test-stat-default b/tools/perf/tests/attr/test-stat-default
> index a1e2da0a9a6d..e47fb4944679 100644
> --- a/tools/perf/tests/attr/test-stat-default
> +++ b/tools/perf/tests/attr/test-stat-default
> @@ -88,98 +88,142 @@ enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>  [event13:base-stat]
>  fd=13
>  group_fd=11
>  type=4
> -config=33280
> +config=33024
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>  [event14:base-stat]
>  fd=14
>  group_fd=11
>  type=4
> -config=33536
> +config=33280
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>  [event15:base-stat]
>  fd=15
>  group_fd=11
>  type=4
> -config=33024
> +config=33536
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)

topdown-heavy-ops is a topdown level 2 event. I suspect these failures
are caused by the perf stat default output being different when level
2 events are present, inherently newer Intel architectures. The
behavior is expected as the level 2 events are part of the metrics in
the Default group:
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/arch/x86/sapphirerapids/spr-metrics.json?h=perf-tools-next#n641
The test failure isn't expected and we probably need to update the
attribute test for the flexibility added by the "Default" metric group
set up, maybe we can add the level2 events as other optional events.

Thanks,
Ian

>  [event16:base-stat]
>  fd=16
> +group_fd=11
>  type=4
> -config=4109
> +config=33792
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>  [event17:base-stat]
>  fd=17
> +group_fd=11
>  type=4
> -config=17039629
> +config=34048
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>  [event18:base-stat]
>  fd=18
> +group_fd=11
>  type=4
> -config=60
> +config=34304
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>  [event19:base-stat]
>  fd=19
> +group_fd=11
>  type=4
> -config=2097421
> +config=34560
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>  [event20:base-stat]
>  fd=20
>  type=4
> -config=316
> +config=4109
>  optional=1
>
> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>  [event21:base-stat]
>  fd=21
>  type=4
> -config=412
> +config=17039629
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>  [event22:base-stat]
>  fd=22
>  type=4
> -config=572
> +config=60
>  optional=1
>
> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>  [event23:base-stat]
>  fd=23
>  type=4
> -config=706
> +config=2097421
>  optional=1
>
> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>  [event24:base-stat]
>  fd=24
>  type=4
> +config=316
> +optional=1
> +
> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +[event25:base-stat]
> +fd=25
> +type=4
> +config=412
> +optional=1
> +
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +[event26:base-stat]
> +fd=26
> +type=4
> +config=572
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +[event27:base-stat]
> +fd=27
> +type=4
> +config=706
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +[event28:base-stat]
> +fd=28
> +type=4
>  config=270
>  optional=1
> diff --git a/tools/perf/tests/attr/test-stat-detailed-1 b/tools/perf/tests/attr/test-stat-detailed-1
> index 1c52cb05c900..3d500d3e0c5c 100644
> --- a/tools/perf/tests/attr/test-stat-detailed-1
> +++ b/tools/perf/tests/attr/test-stat-detailed-1
> @@ -90,99 +90,143 @@ enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>  [event13:base-stat]
>  fd=13
>  group_fd=11
>  type=4
> -config=33280
> +config=33024
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>  [event14:base-stat]
>  fd=14
>  group_fd=11
>  type=4
> -config=33536
> +config=33280
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>  [event15:base-stat]
>  fd=15
>  group_fd=11
>  type=4
> -config=33024
> +config=33536
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
>  [event16:base-stat]
>  fd=16
> +group_fd=11
>  type=4
> -config=4109
> +config=33792
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>  [event17:base-stat]
>  fd=17
> +group_fd=11
>  type=4
> -config=17039629
> +config=34048
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>  [event18:base-stat]
>  fd=18
> +group_fd=11
>  type=4
> -config=60
> +config=34304
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>  [event19:base-stat]
>  fd=19
> +group_fd=11
>  type=4
> -config=2097421
> +config=34560
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>  [event20:base-stat]
>  fd=20
>  type=4
> -config=316
> +config=4109
>  optional=1
>
> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>  [event21:base-stat]
>  fd=21
>  type=4
> -config=412
> +config=17039629
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>  [event22:base-stat]
>  fd=22
>  type=4
> -config=572
> +config=60
>  optional=1
>
> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>  [event23:base-stat]
>  fd=23
>  type=4
> -config=706
> +config=2097421
>  optional=1
>
> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>  [event24:base-stat]
>  fd=24
>  type=4
> +config=316
> +optional=1
> +
> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +[event25:base-stat]
> +fd=25
> +type=4
> +config=412
> +optional=1
> +
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +[event26:base-stat]
> +fd=26
> +type=4
> +config=572
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +[event27:base-stat]
> +fd=27
> +type=4
> +config=706
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +[event28:base-stat]
> +fd=28
> +type=4
>  config=270
>  optional=1
>
> @@ -190,8 +234,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event25:base-stat]
> -fd=25
> +[event29:base-stat]
> +fd=29
>  type=3
>  config=0
>  optional=1
> @@ -200,8 +244,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event26:base-stat]
> -fd=26
> +[event30:base-stat]
> +fd=30
>  type=3
>  config=65536
>  optional=1
> @@ -210,8 +254,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event27:base-stat]
> -fd=27
> +[event31:base-stat]
> +fd=31
>  type=3
>  config=2
>  optional=1
> @@ -220,8 +264,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event28:base-stat]
> -fd=28
> +[event32:base-stat]
> +fd=32
>  type=3
>  config=65538
>  optional=1
> diff --git a/tools/perf/tests/attr/test-stat-detailed-2 b/tools/perf/tests/attr/test-stat-detailed-2
> index 7e961d24a885..01777a63752f 100644
> --- a/tools/perf/tests/attr/test-stat-detailed-2
> +++ b/tools/perf/tests/attr/test-stat-detailed-2
> @@ -90,99 +90,143 @@ enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>  [event13:base-stat]
>  fd=13
>  group_fd=11
>  type=4
> -config=33280
> +config=33024
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>  [event14:base-stat]
>  fd=14
>  group_fd=11
>  type=4
> -config=33536
> +config=33280
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>  [event15:base-stat]
>  fd=15
>  group_fd=11
>  type=4
> -config=33024
> +config=33536
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
>  [event16:base-stat]
>  fd=16
> +group_fd=11
>  type=4
> -config=4109
> +config=33792
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>  [event17:base-stat]
>  fd=17
> +group_fd=11
>  type=4
> -config=17039629
> +config=34048
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>  [event18:base-stat]
>  fd=18
> +group_fd=11
>  type=4
> -config=60
> +config=34304
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>  [event19:base-stat]
>  fd=19
> +group_fd=11
>  type=4
> -config=2097421
> +config=34560
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>  [event20:base-stat]
>  fd=20
>  type=4
> -config=316
> +config=4109
>  optional=1
>
> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>  [event21:base-stat]
>  fd=21
>  type=4
> -config=412
> +config=17039629
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>  [event22:base-stat]
>  fd=22
>  type=4
> -config=572
> +config=60
>  optional=1
>
> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>  [event23:base-stat]
>  fd=23
>  type=4
> -config=706
> +config=2097421
>  optional=1
>
> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>  [event24:base-stat]
>  fd=24
>  type=4
> +config=316
> +optional=1
> +
> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +[event25:base-stat]
> +fd=25
> +type=4
> +config=412
> +optional=1
> +
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +[event26:base-stat]
> +fd=26
> +type=4
> +config=572
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +[event27:base-stat]
> +fd=27
> +type=4
> +config=706
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +[event28:base-stat]
> +fd=28
> +type=4
>  config=270
>  optional=1
>
> @@ -190,8 +234,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event25:base-stat]
> -fd=25
> +[event29:base-stat]
> +fd=29
>  type=3
>  config=0
>  optional=1
> @@ -200,8 +244,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event26:base-stat]
> -fd=26
> +[event30:base-stat]
> +fd=30
>  type=3
>  config=65536
>  optional=1
> @@ -210,8 +254,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event27:base-stat]
> -fd=27
> +[event31:base-stat]
> +fd=31
>  type=3
>  config=2
>  optional=1
> @@ -220,8 +264,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event28:base-stat]
> -fd=28
> +[event32:base-stat]
> +fd=32
>  type=3
>  config=65538
>  optional=1
> @@ -230,8 +274,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event29:base-stat]
> -fd=29
> +[event33:base-stat]
> +fd=33
>  type=3
>  config=1
>  optional=1
> @@ -240,8 +284,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event30:base-stat]
> -fd=30
> +[event34:base-stat]
> +fd=34
>  type=3
>  config=65537
>  optional=1
> @@ -250,8 +294,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event31:base-stat]
> -fd=31
> +[event35:base-stat]
> +fd=35
>  type=3
>  config=3
>  optional=1
> @@ -260,8 +304,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event32:base-stat]
> -fd=32
> +[event36:base-stat]
> +fd=36
>  type=3
>  config=65539
>  optional=1
> @@ -270,8 +314,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event33:base-stat]
> -fd=33
> +[event37:base-stat]
> +fd=37
>  type=3
>  config=4
>  optional=1
> @@ -280,8 +324,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event34:base-stat]
> -fd=34
> +[event38:base-stat]
> +fd=38
>  type=3
>  config=65540
>  optional=1
> diff --git a/tools/perf/tests/attr/test-stat-detailed-3 b/tools/perf/tests/attr/test-stat-detailed-3
> index e50535f45977..8400abd7e1e4 100644
> --- a/tools/perf/tests/attr/test-stat-detailed-3
> +++ b/tools/perf/tests/attr/test-stat-detailed-3
> @@ -90,99 +90,143 @@ enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>  [event13:base-stat]
>  fd=13
>  group_fd=11
>  type=4
> -config=33280
> +config=33024
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>  [event14:base-stat]
>  fd=14
>  group_fd=11
>  type=4
> -config=33536
> +config=33280
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>  [event15:base-stat]
>  fd=15
>  group_fd=11
>  type=4
> -config=33024
> +config=33536
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
>  [event16:base-stat]
>  fd=16
> +group_fd=11
>  type=4
> -config=4109
> +config=33792
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>  [event17:base-stat]
>  fd=17
> +group_fd=11
>  type=4
> -config=17039629
> +config=34048
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>  [event18:base-stat]
>  fd=18
> +group_fd=11
>  type=4
> -config=60
> +config=34304
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>  [event19:base-stat]
>  fd=19
> +group_fd=11
>  type=4
> -config=2097421
> +config=34560
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>  [event20:base-stat]
>  fd=20
>  type=4
> -config=316
> +config=4109
>  optional=1
>
> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>  [event21:base-stat]
>  fd=21
>  type=4
> -config=412
> +config=17039629
>  optional=1
>
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>  [event22:base-stat]
>  fd=22
>  type=4
> -config=572
> +config=60
>  optional=1
>
> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>  [event23:base-stat]
>  fd=23
>  type=4
> -config=706
> +config=2097421
>  optional=1
>
> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>  [event24:base-stat]
>  fd=24
>  type=4
> +config=316
> +optional=1
> +
> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +[event25:base-stat]
> +fd=25
> +type=4
> +config=412
> +optional=1
> +
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +[event26:base-stat]
> +fd=26
> +type=4
> +config=572
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +[event27:base-stat]
> +fd=27
> +type=4
> +config=706
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +[event28:base-stat]
> +fd=28
> +type=4
>  config=270
>  optional=1
>
> @@ -190,8 +234,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event25:base-stat]
> -fd=25
> +[event29:base-stat]
> +fd=29
>  type=3
>  config=0
>  optional=1
> @@ -200,8 +244,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event26:base-stat]
> -fd=26
> +[event30:base-stat]
> +fd=30
>  type=3
>  config=65536
>  optional=1
> @@ -210,8 +254,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event27:base-stat]
> -fd=27
> +[event31:base-stat]
> +fd=31
>  type=3
>  config=2
>  optional=1
> @@ -220,8 +264,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event28:base-stat]
> -fd=28
> +[event32:base-stat]
> +fd=32
>  type=3
>  config=65538
>  optional=1
> @@ -230,8 +274,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event29:base-stat]
> -fd=29
> +[event33:base-stat]
> +fd=33
>  type=3
>  config=1
>  optional=1
> @@ -240,8 +284,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event30:base-stat]
> -fd=30
> +[event34:base-stat]
> +fd=34
>  type=3
>  config=65537
>  optional=1
> @@ -250,8 +294,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event31:base-stat]
> -fd=31
> +[event35:base-stat]
> +fd=35
>  type=3
>  config=3
>  optional=1
> @@ -260,8 +304,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event32:base-stat]
> -fd=32
> +[event36:base-stat]
> +fd=36
>  type=3
>  config=65539
>  optional=1
> @@ -270,8 +314,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event33:base-stat]
> -fd=33
> +[event37:base-stat]
> +fd=37
>  type=3
>  config=4
>  optional=1
> @@ -280,8 +324,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event34:base-stat]
> -fd=34
> +[event38:base-stat]
> +fd=38
>  type=3
>  config=65540
>  optional=1
> @@ -290,8 +334,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event35:base-stat]
> -fd=35
> +[event39:base-stat]
> +fd=39
>  type=3
>  config=512
>  optional=1
> @@ -300,8 +344,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event36:base-stat]
> -fd=36
> +[event40:base-stat]
> +fd=40
>  type=3
>  config=66048
>  optional=1
> --
> 2.43.0
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf test attr: Add back missing topdown events
  2024-01-22 22:01 ` Ian Rogers
@ 2024-01-26 15:14   ` Michael Petlan
  2024-02-08 16:19     ` Michael Petlan
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Petlan @ 2024-01-26 15:14 UTC (permalink / raw)
  To: Ian Rogers; +Cc: vmolnaro, linux-perf-users, acme, acme

[-- Attachment #1: Type: text/plain, Size: 25858 bytes --]

On Mon, 22 Jan 2024, Ian Rogers wrote:
> On Mon, Jan 22, 2024 at 1:39 PM <vmolnaro@redhat.com> wrote:
> >
> > From: Veronika Molnarova <vmolnaro@redhat.com>
> >
> > With the patch 0b6c5371c03c "Add missing topdown metrics events" eight
> > topdown metric events with numbers ranging from 0x8000 to 0x8700 were
> > added to the test since they were added as 'perf stat' default events.
> > Later the patch 951efb9976ce "Update no event/metric expectations" kept
> > only 4 of those events(0x8000-0x8300).
> >
> > Currently, the topdown events with numbers 0x8400 to 0x8700 are missing
> > from the list of expected events resulting in a failure. Add back the
> > missing topdown events.
> >
> > Fixes: 951efb9976ce ("perf test attr: Update no event/metric expectations")
> > Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
> > ---
> >  tools/perf/tests/attr/test-stat-default    |  90 ++++++++++----
> >  tools/perf/tests/attr/test-stat-detailed-1 | 106 +++++++++++-----
> >  tools/perf/tests/attr/test-stat-detailed-2 | 130 ++++++++++++-------
> >  tools/perf/tests/attr/test-stat-detailed-3 | 138 ++++++++++++++-------
> >  4 files changed, 320 insertions(+), 144 deletions(-)
> >
> > diff --git a/tools/perf/tests/attr/test-stat-default b/tools/perf/tests/attr/test-stat-default
> > index a1e2da0a9a6d..e47fb4944679 100644
> > --- a/tools/perf/tests/attr/test-stat-default
> > +++ b/tools/perf/tests/attr/test-stat-default
> > @@ -88,98 +88,142 @@ enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >  [event13:base-stat]
> >  fd=13
> >  group_fd=11
> >  type=4
> > -config=33280
> > +config=33024
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >  [event14:base-stat]
> >  fd=14
> >  group_fd=11
> >  type=4
> > -config=33536
> > +config=33280
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >  [event15:base-stat]
> >  fd=15
> >  group_fd=11
> >  type=4
> > -config=33024
> > +config=33536
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> 
> topdown-heavy-ops is a topdown level 2 event. I suspect these failures
> are caused by the perf stat default output being different when level
> 2 events are present, inherently newer Intel architectures. The
> behavior is expected as the level 2 events are part of the metrics in
> the Default group:
> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/arch/x86/sapphirerapids/spr-metrics.json?h=perf-tools-next#n641
> The test failure isn't expected and we probably need to update the
> attribute test for the flexibility added by the "Default" metric group
> set up, maybe we can add the level2 events as other optional events.

Hello Ian.

Indeed, topdown level 2 events may appear in the default `perf stat`
output on newer Intel systems. And because of that, they should be
included in attr/test-stat-default and similar, shouldn't they?

I think the test failure is quite expected in case the level 2
events aren't listed there but are shown by `perf stat`.

Thanks,
Michael
> 
> Thanks,
> Ian
> 
> >  [event16:base-stat]
> >  fd=16
> > +group_fd=11
> >  type=4
> > -config=4109
> > +config=33792
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >  [event17:base-stat]
> >  fd=17
> > +group_fd=11
> >  type=4
> > -config=17039629
> > +config=34048
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >  [event18:base-stat]
> >  fd=18
> > +group_fd=11
> >  type=4
> > -config=60
> > +config=34304
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >  [event19:base-stat]
> >  fd=19
> > +group_fd=11
> >  type=4
> > -config=2097421
> > +config=34560
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >  [event20:base-stat]
> >  fd=20
> >  type=4
> > -config=316
> > +config=4109
> >  optional=1
> >
> > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >  [event21:base-stat]
> >  fd=21
> >  type=4
> > -config=412
> > +config=17039629
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >  [event22:base-stat]
> >  fd=22
> >  type=4
> > -config=572
> > +config=60
> >  optional=1
> >
> > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >  [event23:base-stat]
> >  fd=23
> >  type=4
> > -config=706
> > +config=2097421
> >  optional=1
> >
> > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >  [event24:base-stat]
> >  fd=24
> >  type=4
> > +config=316
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +[event25:base-stat]
> > +fd=25
> > +type=4
> > +config=412
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +[event26:base-stat]
> > +fd=26
> > +type=4
> > +config=572
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +[event27:base-stat]
> > +fd=27
> > +type=4
> > +config=706
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +[event28:base-stat]
> > +fd=28
> > +type=4
> >  config=270
> >  optional=1
> > diff --git a/tools/perf/tests/attr/test-stat-detailed-1 b/tools/perf/tests/attr/test-stat-detailed-1
> > index 1c52cb05c900..3d500d3e0c5c 100644
> > --- a/tools/perf/tests/attr/test-stat-detailed-1
> > +++ b/tools/perf/tests/attr/test-stat-detailed-1
> > @@ -90,99 +90,143 @@ enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >  [event13:base-stat]
> >  fd=13
> >  group_fd=11
> >  type=4
> > -config=33280
> > +config=33024
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >  [event14:base-stat]
> >  fd=14
> >  group_fd=11
> >  type=4
> > -config=33536
> > +config=33280
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >  [event15:base-stat]
> >  fd=15
> >  group_fd=11
> >  type=4
> > -config=33024
> > +config=33536
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> >  [event16:base-stat]
> >  fd=16
> > +group_fd=11
> >  type=4
> > -config=4109
> > +config=33792
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >  [event17:base-stat]
> >  fd=17
> > +group_fd=11
> >  type=4
> > -config=17039629
> > +config=34048
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >  [event18:base-stat]
> >  fd=18
> > +group_fd=11
> >  type=4
> > -config=60
> > +config=34304
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >  [event19:base-stat]
> >  fd=19
> > +group_fd=11
> >  type=4
> > -config=2097421
> > +config=34560
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >  [event20:base-stat]
> >  fd=20
> >  type=4
> > -config=316
> > +config=4109
> >  optional=1
> >
> > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >  [event21:base-stat]
> >  fd=21
> >  type=4
> > -config=412
> > +config=17039629
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >  [event22:base-stat]
> >  fd=22
> >  type=4
> > -config=572
> > +config=60
> >  optional=1
> >
> > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >  [event23:base-stat]
> >  fd=23
> >  type=4
> > -config=706
> > +config=2097421
> >  optional=1
> >
> > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >  [event24:base-stat]
> >  fd=24
> >  type=4
> > +config=316
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +[event25:base-stat]
> > +fd=25
> > +type=4
> > +config=412
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +[event26:base-stat]
> > +fd=26
> > +type=4
> > +config=572
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +[event27:base-stat]
> > +fd=27
> > +type=4
> > +config=706
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +[event28:base-stat]
> > +fd=28
> > +type=4
> >  config=270
> >  optional=1
> >
> > @@ -190,8 +234,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event25:base-stat]
> > -fd=25
> > +[event29:base-stat]
> > +fd=29
> >  type=3
> >  config=0
> >  optional=1
> > @@ -200,8 +244,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event26:base-stat]
> > -fd=26
> > +[event30:base-stat]
> > +fd=30
> >  type=3
> >  config=65536
> >  optional=1
> > @@ -210,8 +254,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event27:base-stat]
> > -fd=27
> > +[event31:base-stat]
> > +fd=31
> >  type=3
> >  config=2
> >  optional=1
> > @@ -220,8 +264,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event28:base-stat]
> > -fd=28
> > +[event32:base-stat]
> > +fd=32
> >  type=3
> >  config=65538
> >  optional=1
> > diff --git a/tools/perf/tests/attr/test-stat-detailed-2 b/tools/perf/tests/attr/test-stat-detailed-2
> > index 7e961d24a885..01777a63752f 100644
> > --- a/tools/perf/tests/attr/test-stat-detailed-2
> > +++ b/tools/perf/tests/attr/test-stat-detailed-2
> > @@ -90,99 +90,143 @@ enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >  [event13:base-stat]
> >  fd=13
> >  group_fd=11
> >  type=4
> > -config=33280
> > +config=33024
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >  [event14:base-stat]
> >  fd=14
> >  group_fd=11
> >  type=4
> > -config=33536
> > +config=33280
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >  [event15:base-stat]
> >  fd=15
> >  group_fd=11
> >  type=4
> > -config=33024
> > +config=33536
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> >  [event16:base-stat]
> >  fd=16
> > +group_fd=11
> >  type=4
> > -config=4109
> > +config=33792
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >  [event17:base-stat]
> >  fd=17
> > +group_fd=11
> >  type=4
> > -config=17039629
> > +config=34048
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >  [event18:base-stat]
> >  fd=18
> > +group_fd=11
> >  type=4
> > -config=60
> > +config=34304
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >  [event19:base-stat]
> >  fd=19
> > +group_fd=11
> >  type=4
> > -config=2097421
> > +config=34560
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >  [event20:base-stat]
> >  fd=20
> >  type=4
> > -config=316
> > +config=4109
> >  optional=1
> >
> > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >  [event21:base-stat]
> >  fd=21
> >  type=4
> > -config=412
> > +config=17039629
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >  [event22:base-stat]
> >  fd=22
> >  type=4
> > -config=572
> > +config=60
> >  optional=1
> >
> > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >  [event23:base-stat]
> >  fd=23
> >  type=4
> > -config=706
> > +config=2097421
> >  optional=1
> >
> > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >  [event24:base-stat]
> >  fd=24
> >  type=4
> > +config=316
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +[event25:base-stat]
> > +fd=25
> > +type=4
> > +config=412
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +[event26:base-stat]
> > +fd=26
> > +type=4
> > +config=572
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +[event27:base-stat]
> > +fd=27
> > +type=4
> > +config=706
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +[event28:base-stat]
> > +fd=28
> > +type=4
> >  config=270
> >  optional=1
> >
> > @@ -190,8 +234,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event25:base-stat]
> > -fd=25
> > +[event29:base-stat]
> > +fd=29
> >  type=3
> >  config=0
> >  optional=1
> > @@ -200,8 +244,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event26:base-stat]
> > -fd=26
> > +[event30:base-stat]
> > +fd=30
> >  type=3
> >  config=65536
> >  optional=1
> > @@ -210,8 +254,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event27:base-stat]
> > -fd=27
> > +[event31:base-stat]
> > +fd=31
> >  type=3
> >  config=2
> >  optional=1
> > @@ -220,8 +264,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event28:base-stat]
> > -fd=28
> > +[event32:base-stat]
> > +fd=32
> >  type=3
> >  config=65538
> >  optional=1
> > @@ -230,8 +274,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event29:base-stat]
> > -fd=29
> > +[event33:base-stat]
> > +fd=33
> >  type=3
> >  config=1
> >  optional=1
> > @@ -240,8 +284,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event30:base-stat]
> > -fd=30
> > +[event34:base-stat]
> > +fd=34
> >  type=3
> >  config=65537
> >  optional=1
> > @@ -250,8 +294,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event31:base-stat]
> > -fd=31
> > +[event35:base-stat]
> > +fd=35
> >  type=3
> >  config=3
> >  optional=1
> > @@ -260,8 +304,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event32:base-stat]
> > -fd=32
> > +[event36:base-stat]
> > +fd=36
> >  type=3
> >  config=65539
> >  optional=1
> > @@ -270,8 +314,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event33:base-stat]
> > -fd=33
> > +[event37:base-stat]
> > +fd=37
> >  type=3
> >  config=4
> >  optional=1
> > @@ -280,8 +324,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event34:base-stat]
> > -fd=34
> > +[event38:base-stat]
> > +fd=38
> >  type=3
> >  config=65540
> >  optional=1
> > diff --git a/tools/perf/tests/attr/test-stat-detailed-3 b/tools/perf/tests/attr/test-stat-detailed-3
> > index e50535f45977..8400abd7e1e4 100644
> > --- a/tools/perf/tests/attr/test-stat-detailed-3
> > +++ b/tools/perf/tests/attr/test-stat-detailed-3
> > @@ -90,99 +90,143 @@ enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >  [event13:base-stat]
> >  fd=13
> >  group_fd=11
> >  type=4
> > -config=33280
> > +config=33024
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >  [event14:base-stat]
> >  fd=14
> >  group_fd=11
> >  type=4
> > -config=33536
> > +config=33280
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >  [event15:base-stat]
> >  fd=15
> >  group_fd=11
> >  type=4
> > -config=33024
> > +config=33536
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> >  [event16:base-stat]
> >  fd=16
> > +group_fd=11
> >  type=4
> > -config=4109
> > +config=33792
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >  [event17:base-stat]
> >  fd=17
> > +group_fd=11
> >  type=4
> > -config=17039629
> > +config=34048
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >  [event18:base-stat]
> >  fd=18
> > +group_fd=11
> >  type=4
> > -config=60
> > +config=34304
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >  [event19:base-stat]
> >  fd=19
> > +group_fd=11
> >  type=4
> > -config=2097421
> > +config=34560
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >  [event20:base-stat]
> >  fd=20
> >  type=4
> > -config=316
> > +config=4109
> >  optional=1
> >
> > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >  [event21:base-stat]
> >  fd=21
> >  type=4
> > -config=412
> > +config=17039629
> >  optional=1
> >
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >  [event22:base-stat]
> >  fd=22
> >  type=4
> > -config=572
> > +config=60
> >  optional=1
> >
> > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >  [event23:base-stat]
> >  fd=23
> >  type=4
> > -config=706
> > +config=2097421
> >  optional=1
> >
> > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >  [event24:base-stat]
> >  fd=24
> >  type=4
> > +config=316
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +[event25:base-stat]
> > +fd=25
> > +type=4
> > +config=412
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +[event26:base-stat]
> > +fd=26
> > +type=4
> > +config=572
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +[event27:base-stat]
> > +fd=27
> > +type=4
> > +config=706
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +[event28:base-stat]
> > +fd=28
> > +type=4
> >  config=270
> >  optional=1
> >
> > @@ -190,8 +234,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event25:base-stat]
> > -fd=25
> > +[event29:base-stat]
> > +fd=29
> >  type=3
> >  config=0
> >  optional=1
> > @@ -200,8 +244,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event26:base-stat]
> > -fd=26
> > +[event30:base-stat]
> > +fd=30
> >  type=3
> >  config=65536
> >  optional=1
> > @@ -210,8 +254,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event27:base-stat]
> > -fd=27
> > +[event31:base-stat]
> > +fd=31
> >  type=3
> >  config=2
> >  optional=1
> > @@ -220,8 +264,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event28:base-stat]
> > -fd=28
> > +[event32:base-stat]
> > +fd=32
> >  type=3
> >  config=65538
> >  optional=1
> > @@ -230,8 +274,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event29:base-stat]
> > -fd=29
> > +[event33:base-stat]
> > +fd=33
> >  type=3
> >  config=1
> >  optional=1
> > @@ -240,8 +284,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event30:base-stat]
> > -fd=30
> > +[event34:base-stat]
> > +fd=34
> >  type=3
> >  config=65537
> >  optional=1
> > @@ -250,8 +294,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event31:base-stat]
> > -fd=31
> > +[event35:base-stat]
> > +fd=35
> >  type=3
> >  config=3
> >  optional=1
> > @@ -260,8 +304,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event32:base-stat]
> > -fd=32
> > +[event36:base-stat]
> > +fd=36
> >  type=3
> >  config=65539
> >  optional=1
> > @@ -270,8 +314,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event33:base-stat]
> > -fd=33
> > +[event37:base-stat]
> > +fd=37
> >  type=3
> >  config=4
> >  optional=1
> > @@ -280,8 +324,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event34:base-stat]
> > -fd=34
> > +[event38:base-stat]
> > +fd=38
> >  type=3
> >  config=65540
> >  optional=1
> > @@ -290,8 +334,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event35:base-stat]
> > -fd=35
> > +[event39:base-stat]
> > +fd=39
> >  type=3
> >  config=512
> >  optional=1
> > @@ -300,8 +344,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event36:base-stat]
> > -fd=36
> > +[event40:base-stat]
> > +fd=40
> >  type=3
> >  config=66048
> >  optional=1
> > --
> > 2.43.0
> >
> 
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf test attr: Add back missing topdown events
  2024-01-26 15:14   ` Michael Petlan
@ 2024-02-08 16:19     ` Michael Petlan
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Petlan @ 2024-02-08 16:19 UTC (permalink / raw)
  To: irogers; +Cc: vmolnaro, linux-perf-users, acme, acme

[-- Attachment #1: Type: text/plain, Size: 25602 bytes --]

On Fri, 26 Jan 2024, Michael Petlan wrote:
> On Mon, 22 Jan 2024, Ian Rogers wrote:
> > On Mon, Jan 22, 2024 at 1:39 PM <vmolnaro@redhat.com> wrote:
> > >
[...]

> > topdown-heavy-ops is a topdown level 2 event. I suspect these failures
> > are caused by the perf stat default output being different when level
> > 2 events are present, inherently newer Intel architectures. The
> > behavior is expected as the level 2 events are part of the metrics in
> > the Default group:
> > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/arch/x86/sapphirerapids/spr-metrics.json?h=perf-tools-next#n641
> > The test failure isn't expected and we probably need to update the
> > attribute test for the flexibility added by the "Default" metric group
> > set up, maybe we can add the level2 events as other optional events.
> 
> Hello Ian.
> 
> Indeed, topdown level 2 events may appear in the default `perf stat`
> output on newer Intel systems. And because of that, they should be
> included in attr/test-stat-default and similar, shouldn't they?
> 
> I think the test failure is quite expected in case the level 2
> events aren't listed there but are shown by `perf stat`.
> 
> Thanks,
> Michael

Hello Ian,

does the patch look good to you? Or do you have any suggestions
how to better fix the testcase?
Thanks!

Michael

> > 
> > Thanks,
> > Ian
> > 
> > >  [event16:base-stat]
> > >  fd=16
> > > +group_fd=11
> > >  type=4
> > > -config=4109
> > > +config=33792
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> > >  [event17:base-stat]
> > >  fd=17
> > > +group_fd=11
> > >  type=4
> > > -config=17039629
> > > +config=34048
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> > >  [event18:base-stat]
> > >  fd=18
> > > +group_fd=11
> > >  type=4
> > > -config=60
> > > +config=34304
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> > >  [event19:base-stat]
> > >  fd=19
> > > +group_fd=11
> > >  type=4
> > > -config=2097421
> > > +config=34560
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > >  [event20:base-stat]
> > >  fd=20
> > >  type=4
> > > -config=316
> > > +config=4109
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > >  [event21:base-stat]
> > >  fd=21
> > >  type=4
> > > -config=412
> > > +config=17039629
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > >  [event22:base-stat]
> > >  fd=22
> > >  type=4
> > > -config=572
> > > +config=60
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > >  [event23:base-stat]
> > >  fd=23
> > >  type=4
> > > -config=706
> > > +config=2097421
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > >  [event24:base-stat]
> > >  fd=24
> > >  type=4
> > > +config=316
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > > +[event25:base-stat]
> > > +fd=25
> > > +type=4
> > > +config=412
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > > +[event26:base-stat]
> > > +fd=26
> > > +type=4
> > > +config=572
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > > +[event27:base-stat]
> > > +fd=27
> > > +type=4
> > > +config=706
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > > +[event28:base-stat]
> > > +fd=28
> > > +type=4
> > >  config=270
> > >  optional=1
> > > diff --git a/tools/perf/tests/attr/test-stat-detailed-1 b/tools/perf/tests/attr/test-stat-detailed-1
> > > index 1c52cb05c900..3d500d3e0c5c 100644
> > > --- a/tools/perf/tests/attr/test-stat-detailed-1
> > > +++ b/tools/perf/tests/attr/test-stat-detailed-1
> > > @@ -90,99 +90,143 @@ enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > > +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > >  [event13:base-stat]
> > >  fd=13
> > >  group_fd=11
> > >  type=4
> > > -config=33280
> > > +config=33024
> > >  disabled=0
> > >  enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > > +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > >  [event14:base-stat]
> > >  fd=14
> > >  group_fd=11
> > >  type=4
> > > -config=33536
> > > +config=33280
> > >  disabled=0
> > >  enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > > +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > >  [event15:base-stat]
> > >  fd=15
> > >  group_fd=11
> > >  type=4
> > > -config=33024
> > > +config=33536
> > >  disabled=0
> > >  enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > > +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> > >  [event16:base-stat]
> > >  fd=16
> > > +group_fd=11
> > >  type=4
> > > -config=4109
> > > +config=33792
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> > >  [event17:base-stat]
> > >  fd=17
> > > +group_fd=11
> > >  type=4
> > > -config=17039629
> > > +config=34048
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> > >  [event18:base-stat]
> > >  fd=18
> > > +group_fd=11
> > >  type=4
> > > -config=60
> > > +config=34304
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> > >  [event19:base-stat]
> > >  fd=19
> > > +group_fd=11
> > >  type=4
> > > -config=2097421
> > > +config=34560
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > >  [event20:base-stat]
> > >  fd=20
> > >  type=4
> > > -config=316
> > > +config=4109
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > >  [event21:base-stat]
> > >  fd=21
> > >  type=4
> > > -config=412
> > > +config=17039629
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > >  [event22:base-stat]
> > >  fd=22
> > >  type=4
> > > -config=572
> > > +config=60
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > >  [event23:base-stat]
> > >  fd=23
> > >  type=4
> > > -config=706
> > > +config=2097421
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > >  [event24:base-stat]
> > >  fd=24
> > >  type=4
> > > +config=316
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > > +[event25:base-stat]
> > > +fd=25
> > > +type=4
> > > +config=412
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > > +[event26:base-stat]
> > > +fd=26
> > > +type=4
> > > +config=572
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > > +[event27:base-stat]
> > > +fd=27
> > > +type=4
> > > +config=706
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > > +[event28:base-stat]
> > > +fd=28
> > > +type=4
> > >  config=270
> > >  optional=1
> > >
> > > @@ -190,8 +234,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event25:base-stat]
> > > -fd=25
> > > +[event29:base-stat]
> > > +fd=29
> > >  type=3
> > >  config=0
> > >  optional=1
> > > @@ -200,8 +244,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event26:base-stat]
> > > -fd=26
> > > +[event30:base-stat]
> > > +fd=30
> > >  type=3
> > >  config=65536
> > >  optional=1
> > > @@ -210,8 +254,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event27:base-stat]
> > > -fd=27
> > > +[event31:base-stat]
> > > +fd=31
> > >  type=3
> > >  config=2
> > >  optional=1
> > > @@ -220,8 +264,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event28:base-stat]
> > > -fd=28
> > > +[event32:base-stat]
> > > +fd=32
> > >  type=3
> > >  config=65538
> > >  optional=1
> > > diff --git a/tools/perf/tests/attr/test-stat-detailed-2 b/tools/perf/tests/attr/test-stat-detailed-2
> > > index 7e961d24a885..01777a63752f 100644
> > > --- a/tools/perf/tests/attr/test-stat-detailed-2
> > > +++ b/tools/perf/tests/attr/test-stat-detailed-2
> > > @@ -90,99 +90,143 @@ enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > > +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > >  [event13:base-stat]
> > >  fd=13
> > >  group_fd=11
> > >  type=4
> > > -config=33280
> > > +config=33024
> > >  disabled=0
> > >  enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > > +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > >  [event14:base-stat]
> > >  fd=14
> > >  group_fd=11
> > >  type=4
> > > -config=33536
> > > +config=33280
> > >  disabled=0
> > >  enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > > +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > >  [event15:base-stat]
> > >  fd=15
> > >  group_fd=11
> > >  type=4
> > > -config=33024
> > > +config=33536
> > >  disabled=0
> > >  enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > > +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> > >  [event16:base-stat]
> > >  fd=16
> > > +group_fd=11
> > >  type=4
> > > -config=4109
> > > +config=33792
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> > >  [event17:base-stat]
> > >  fd=17
> > > +group_fd=11
> > >  type=4
> > > -config=17039629
> > > +config=34048
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> > >  [event18:base-stat]
> > >  fd=18
> > > +group_fd=11
> > >  type=4
> > > -config=60
> > > +config=34304
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> > >  [event19:base-stat]
> > >  fd=19
> > > +group_fd=11
> > >  type=4
> > > -config=2097421
> > > +config=34560
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > >  [event20:base-stat]
> > >  fd=20
> > >  type=4
> > > -config=316
> > > +config=4109
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > >  [event21:base-stat]
> > >  fd=21
> > >  type=4
> > > -config=412
> > > +config=17039629
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > >  [event22:base-stat]
> > >  fd=22
> > >  type=4
> > > -config=572
> > > +config=60
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > >  [event23:base-stat]
> > >  fd=23
> > >  type=4
> > > -config=706
> > > +config=2097421
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > >  [event24:base-stat]
> > >  fd=24
> > >  type=4
> > > +config=316
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > > +[event25:base-stat]
> > > +fd=25
> > > +type=4
> > > +config=412
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > > +[event26:base-stat]
> > > +fd=26
> > > +type=4
> > > +config=572
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > > +[event27:base-stat]
> > > +fd=27
> > > +type=4
> > > +config=706
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > > +[event28:base-stat]
> > > +fd=28
> > > +type=4
> > >  config=270
> > >  optional=1
> > >
> > > @@ -190,8 +234,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event25:base-stat]
> > > -fd=25
> > > +[event29:base-stat]
> > > +fd=29
> > >  type=3
> > >  config=0
> > >  optional=1
> > > @@ -200,8 +244,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event26:base-stat]
> > > -fd=26
> > > +[event30:base-stat]
> > > +fd=30
> > >  type=3
> > >  config=65536
> > >  optional=1
> > > @@ -210,8 +254,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event27:base-stat]
> > > -fd=27
> > > +[event31:base-stat]
> > > +fd=31
> > >  type=3
> > >  config=2
> > >  optional=1
> > > @@ -220,8 +264,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event28:base-stat]
> > > -fd=28
> > > +[event32:base-stat]
> > > +fd=32
> > >  type=3
> > >  config=65538
> > >  optional=1
> > > @@ -230,8 +274,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event29:base-stat]
> > > -fd=29
> > > +[event33:base-stat]
> > > +fd=33
> > >  type=3
> > >  config=1
> > >  optional=1
> > > @@ -240,8 +284,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event30:base-stat]
> > > -fd=30
> > > +[event34:base-stat]
> > > +fd=34
> > >  type=3
> > >  config=65537
> > >  optional=1
> > > @@ -250,8 +294,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event31:base-stat]
> > > -fd=31
> > > +[event35:base-stat]
> > > +fd=35
> > >  type=3
> > >  config=3
> > >  optional=1
> > > @@ -260,8 +304,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event32:base-stat]
> > > -fd=32
> > > +[event36:base-stat]
> > > +fd=36
> > >  type=3
> > >  config=65539
> > >  optional=1
> > > @@ -270,8 +314,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event33:base-stat]
> > > -fd=33
> > > +[event37:base-stat]
> > > +fd=37
> > >  type=3
> > >  config=4
> > >  optional=1
> > > @@ -280,8 +324,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event34:base-stat]
> > > -fd=34
> > > +[event38:base-stat]
> > > +fd=38
> > >  type=3
> > >  config=65540
> > >  optional=1
> > > diff --git a/tools/perf/tests/attr/test-stat-detailed-3 b/tools/perf/tests/attr/test-stat-detailed-3
> > > index e50535f45977..8400abd7e1e4 100644
> > > --- a/tools/perf/tests/attr/test-stat-detailed-3
> > > +++ b/tools/perf/tests/attr/test-stat-detailed-3
> > > @@ -90,99 +90,143 @@ enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > > +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > >  [event13:base-stat]
> > >  fd=13
> > >  group_fd=11
> > >  type=4
> > > -config=33280
> > > +config=33024
> > >  disabled=0
> > >  enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > > +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > >  [event14:base-stat]
> > >  fd=14
> > >  group_fd=11
> > >  type=4
> > > -config=33536
> > > +config=33280
> > >  disabled=0
> > >  enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > > +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > >  [event15:base-stat]
> > >  fd=15
> > >  group_fd=11
> > >  type=4
> > > -config=33024
> > > +config=33536
> > >  disabled=0
> > >  enable_on_exec=0
> > >  read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > > +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> > >  [event16:base-stat]
> > >  fd=16
> > > +group_fd=11
> > >  type=4
> > > -config=4109
> > > +config=33792
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> > >  [event17:base-stat]
> > >  fd=17
> > > +group_fd=11
> > >  type=4
> > > -config=17039629
> > > +config=34048
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> > >  [event18:base-stat]
> > >  fd=18
> > > +group_fd=11
> > >  type=4
> > > -config=60
> > > +config=34304
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> > >  [event19:base-stat]
> > >  fd=19
> > > +group_fd=11
> > >  type=4
> > > -config=2097421
> > > +config=34560
> > > +disabled=0
> > > +enable_on_exec=0
> > > +read_format=15
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > >  [event20:base-stat]
> > >  fd=20
> > >  type=4
> > > -config=316
> > > +config=4109
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > >  [event21:base-stat]
> > >  fd=21
> > >  type=4
> > > -config=412
> > > +config=17039629
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > >  [event22:base-stat]
> > >  fd=22
> > >  type=4
> > > -config=572
> > > +config=60
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > >  [event23:base-stat]
> > >  fd=23
> > >  type=4
> > > -config=706
> > > +config=2097421
> > >  optional=1
> > >
> > > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > >  [event24:base-stat]
> > >  fd=24
> > >  type=4
> > > +config=316
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > > +[event25:base-stat]
> > > +fd=25
> > > +type=4
> > > +config=412
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > > +[event26:base-stat]
> > > +fd=26
> > > +type=4
> > > +config=572
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > > +[event27:base-stat]
> > > +fd=27
> > > +type=4
> > > +config=706
> > > +optional=1
> > > +
> > > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > > +[event28:base-stat]
> > > +fd=28
> > > +type=4
> > >  config=270
> > >  optional=1
> > >
> > > @@ -190,8 +234,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event25:base-stat]
> > > -fd=25
> > > +[event29:base-stat]
> > > +fd=29
> > >  type=3
> > >  config=0
> > >  optional=1
> > > @@ -200,8 +244,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event26:base-stat]
> > > -fd=26
> > > +[event30:base-stat]
> > > +fd=30
> > >  type=3
> > >  config=65536
> > >  optional=1
> > > @@ -210,8 +254,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event27:base-stat]
> > > -fd=27
> > > +[event31:base-stat]
> > > +fd=31
> > >  type=3
> > >  config=2
> > >  optional=1
> > > @@ -220,8 +264,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event28:base-stat]
> > > -fd=28
> > > +[event32:base-stat]
> > > +fd=32
> > >  type=3
> > >  config=65538
> > >  optional=1
> > > @@ -230,8 +274,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event29:base-stat]
> > > -fd=29
> > > +[event33:base-stat]
> > > +fd=33
> > >  type=3
> > >  config=1
> > >  optional=1
> > > @@ -240,8 +284,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event30:base-stat]
> > > -fd=30
> > > +[event34:base-stat]
> > > +fd=34
> > >  type=3
> > >  config=65537
> > >  optional=1
> > > @@ -250,8 +294,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event31:base-stat]
> > > -fd=31
> > > +[event35:base-stat]
> > > +fd=35
> > >  type=3
> > >  config=3
> > >  optional=1
> > > @@ -260,8 +304,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event32:base-stat]
> > > -fd=32
> > > +[event36:base-stat]
> > > +fd=36
> > >  type=3
> > >  config=65539
> > >  optional=1
> > > @@ -270,8 +314,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event33:base-stat]
> > > -fd=33
> > > +[event37:base-stat]
> > > +fd=37
> > >  type=3
> > >  config=4
> > >  optional=1
> > > @@ -280,8 +324,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event34:base-stat]
> > > -fd=34
> > > +[event38:base-stat]
> > > +fd=38
> > >  type=3
> > >  config=65540
> > >  optional=1
> > > @@ -290,8 +334,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > > -[event35:base-stat]
> > > -fd=35
> > > +[event39:base-stat]
> > > +fd=39
> > >  type=3
> > >  config=512
> > >  optional=1
> > > @@ -300,8 +344,8 @@ optional=1
> > >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> > >  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
> > >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > > -[event36:base-stat]
> > > -fd=36
> > > +[event40:base-stat]
> > > +fd=40
> > >  type=3
> > >  config=66048
> > >  optional=1
> > > --
> > > 2.43.0
> > >
> > 
> >

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] perf test attr: Add back missing topdown events
@ 2024-03-11  8:16 vmolnaro
  2024-03-20 12:16 ` Michael Petlan
  2024-10-04 19:29 ` Namhyung Kim
  0 siblings, 2 replies; 10+ messages in thread
From: vmolnaro @ 2024-03-11  8:16 UTC (permalink / raw)
  To: linux-perf-users, acme, acme; +Cc: mpetlan, irogers

From: Veronika Molnarova <vmolnaro@redhat.com>

With the patch 0b6c5371c03c "Add missing topdown metrics events" eight
topdown metric events with numbers ranging from 0x8000 to 0x8700 were
added to the test since they were added as 'perf stat' default events.
Later the patch 951efb9976ce "Update no event/metric expectations" kept
only 4 of those events(0x8000-0x8300).

Currently, the topdown events with numbers 0x8400 to 0x8700 are missing
from the list of expected events resulting in a failure. Add back the
missing topdown events.

Fixes: 951efb9976ce ("perf test attr: Update no event/metric expectations")
Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
---
 tools/perf/tests/attr/test-stat-default    |  90 ++++++++++----
 tools/perf/tests/attr/test-stat-detailed-1 | 106 +++++++++++-----
 tools/perf/tests/attr/test-stat-detailed-2 | 130 ++++++++++++-------
 tools/perf/tests/attr/test-stat-detailed-3 | 138 ++++++++++++++-------
 4 files changed, 320 insertions(+), 144 deletions(-)

diff --git a/tools/perf/tests/attr/test-stat-default b/tools/perf/tests/attr/test-stat-default
index a1e2da0a9a6d..e47fb4944679 100644
--- a/tools/perf/tests/attr/test-stat-default
+++ b/tools/perf/tests/attr/test-stat-default
@@ -88,98 +88,142 @@ enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
+# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
 [event13:base-stat]
 fd=13
 group_fd=11
 type=4
-config=33280
+config=33024
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-be-bound (0x8300)
+# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
 [event14:base-stat]
 fd=14
 group_fd=11
 type=4
-config=33536
+config=33280
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
+# PERF_TYPE_RAW / topdown-be-bound (0x8300)
 [event15:base-stat]
 fd=15
 group_fd=11
 type=4
-config=33024
+config=33536
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
+# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
 [event16:base-stat]
 fd=16
+group_fd=11
 type=4
-config=4109
+config=33792
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
+# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
 [event17:base-stat]
 fd=17
+group_fd=11
 type=4
-config=17039629
+config=34048
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
+# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
 [event18:base-stat]
 fd=18
+group_fd=11
 type=4
-config=60
+config=34304
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
+# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
 [event19:base-stat]
 fd=19
+group_fd=11
 type=4
-config=2097421
+config=34560
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
+# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
 [event20:base-stat]
 fd=20
 type=4
-config=316
+config=4109
 optional=1
 
-# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
 [event21:base-stat]
 fd=21
 type=4
-config=412
+config=17039629
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
 [event22:base-stat]
 fd=22
 type=4
-config=572
+config=60
 optional=1
 
-# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
 [event23:base-stat]
 fd=23
 type=4
-config=706
+config=2097421
 optional=1
 
-# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
 [event24:base-stat]
 fd=24
 type=4
+config=316
+optional=1
+
+# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+[event25:base-stat]
+fd=25
+type=4
+config=412
+optional=1
+
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+[event26:base-stat]
+fd=26
+type=4
+config=572
+optional=1
+
+# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+[event27:base-stat]
+fd=27
+type=4
+config=706
+optional=1
+
+# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+[event28:base-stat]
+fd=28
+type=4
 config=270
 optional=1
diff --git a/tools/perf/tests/attr/test-stat-detailed-1 b/tools/perf/tests/attr/test-stat-detailed-1
index 1c52cb05c900..3d500d3e0c5c 100644
--- a/tools/perf/tests/attr/test-stat-detailed-1
+++ b/tools/perf/tests/attr/test-stat-detailed-1
@@ -90,99 +90,143 @@ enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
+# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
 [event13:base-stat]
 fd=13
 group_fd=11
 type=4
-config=33280
+config=33024
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-be-bound (0x8300)
+# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
 [event14:base-stat]
 fd=14
 group_fd=11
 type=4
-config=33536
+config=33280
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
+# PERF_TYPE_RAW / topdown-be-bound (0x8300)
 [event15:base-stat]
 fd=15
 group_fd=11
 type=4
-config=33024
+config=33536
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
+# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
 [event16:base-stat]
 fd=16
+group_fd=11
 type=4
-config=4109
+config=33792
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
+# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
 [event17:base-stat]
 fd=17
+group_fd=11
 type=4
-config=17039629
+config=34048
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
+# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
 [event18:base-stat]
 fd=18
+group_fd=11
 type=4
-config=60
+config=34304
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
+# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
 [event19:base-stat]
 fd=19
+group_fd=11
 type=4
-config=2097421
+config=34560
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
+# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
 [event20:base-stat]
 fd=20
 type=4
-config=316
+config=4109
 optional=1
 
-# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
 [event21:base-stat]
 fd=21
 type=4
-config=412
+config=17039629
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
 [event22:base-stat]
 fd=22
 type=4
-config=572
+config=60
 optional=1
 
-# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
 [event23:base-stat]
 fd=23
 type=4
-config=706
+config=2097421
 optional=1
 
-# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
 [event24:base-stat]
 fd=24
 type=4
+config=316
+optional=1
+
+# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+[event25:base-stat]
+fd=25
+type=4
+config=412
+optional=1
+
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+[event26:base-stat]
+fd=26
+type=4
+config=572
+optional=1
+
+# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+[event27:base-stat]
+fd=27
+type=4
+config=706
+optional=1
+
+# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+[event28:base-stat]
+fd=28
+type=4
 config=270
 optional=1
 
@@ -190,8 +234,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event25:base-stat]
-fd=25
+[event29:base-stat]
+fd=29
 type=3
 config=0
 optional=1
@@ -200,8 +244,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event26:base-stat]
-fd=26
+[event30:base-stat]
+fd=30
 type=3
 config=65536
 optional=1
@@ -210,8 +254,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event27:base-stat]
-fd=27
+[event31:base-stat]
+fd=31
 type=3
 config=2
 optional=1
@@ -220,8 +264,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event28:base-stat]
-fd=28
+[event32:base-stat]
+fd=32
 type=3
 config=65538
 optional=1
diff --git a/tools/perf/tests/attr/test-stat-detailed-2 b/tools/perf/tests/attr/test-stat-detailed-2
index 7e961d24a885..01777a63752f 100644
--- a/tools/perf/tests/attr/test-stat-detailed-2
+++ b/tools/perf/tests/attr/test-stat-detailed-2
@@ -90,99 +90,143 @@ enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
+# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
 [event13:base-stat]
 fd=13
 group_fd=11
 type=4
-config=33280
+config=33024
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-be-bound (0x8300)
+# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
 [event14:base-stat]
 fd=14
 group_fd=11
 type=4
-config=33536
+config=33280
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
+# PERF_TYPE_RAW / topdown-be-bound (0x8300)
 [event15:base-stat]
 fd=15
 group_fd=11
 type=4
-config=33024
+config=33536
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
+# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
 [event16:base-stat]
 fd=16
+group_fd=11
 type=4
-config=4109
+config=33792
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
+# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
 [event17:base-stat]
 fd=17
+group_fd=11
 type=4
-config=17039629
+config=34048
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
+# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
 [event18:base-stat]
 fd=18
+group_fd=11
 type=4
-config=60
+config=34304
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
+# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
 [event19:base-stat]
 fd=19
+group_fd=11
 type=4
-config=2097421
+config=34560
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
+# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
 [event20:base-stat]
 fd=20
 type=4
-config=316
+config=4109
 optional=1
 
-# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
 [event21:base-stat]
 fd=21
 type=4
-config=412
+config=17039629
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
 [event22:base-stat]
 fd=22
 type=4
-config=572
+config=60
 optional=1
 
-# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
 [event23:base-stat]
 fd=23
 type=4
-config=706
+config=2097421
 optional=1
 
-# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
 [event24:base-stat]
 fd=24
 type=4
+config=316
+optional=1
+
+# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+[event25:base-stat]
+fd=25
+type=4
+config=412
+optional=1
+
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+[event26:base-stat]
+fd=26
+type=4
+config=572
+optional=1
+
+# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+[event27:base-stat]
+fd=27
+type=4
+config=706
+optional=1
+
+# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+[event28:base-stat]
+fd=28
+type=4
 config=270
 optional=1
 
@@ -190,8 +234,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event25:base-stat]
-fd=25
+[event29:base-stat]
+fd=29
 type=3
 config=0
 optional=1
@@ -200,8 +244,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event26:base-stat]
-fd=26
+[event30:base-stat]
+fd=30
 type=3
 config=65536
 optional=1
@@ -210,8 +254,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event27:base-stat]
-fd=27
+[event31:base-stat]
+fd=31
 type=3
 config=2
 optional=1
@@ -220,8 +264,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event28:base-stat]
-fd=28
+[event32:base-stat]
+fd=32
 type=3
 config=65538
 optional=1
@@ -230,8 +274,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event29:base-stat]
-fd=29
+[event33:base-stat]
+fd=33
 type=3
 config=1
 optional=1
@@ -240,8 +284,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event30:base-stat]
-fd=30
+[event34:base-stat]
+fd=34
 type=3
 config=65537
 optional=1
@@ -250,8 +294,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event31:base-stat]
-fd=31
+[event35:base-stat]
+fd=35
 type=3
 config=3
 optional=1
@@ -260,8 +304,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event32:base-stat]
-fd=32
+[event36:base-stat]
+fd=36
 type=3
 config=65539
 optional=1
@@ -270,8 +314,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event33:base-stat]
-fd=33
+[event37:base-stat]
+fd=37
 type=3
 config=4
 optional=1
@@ -280,8 +324,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event34:base-stat]
-fd=34
+[event38:base-stat]
+fd=38
 type=3
 config=65540
 optional=1
diff --git a/tools/perf/tests/attr/test-stat-detailed-3 b/tools/perf/tests/attr/test-stat-detailed-3
index e50535f45977..8400abd7e1e4 100644
--- a/tools/perf/tests/attr/test-stat-detailed-3
+++ b/tools/perf/tests/attr/test-stat-detailed-3
@@ -90,99 +90,143 @@ enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
+# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
 [event13:base-stat]
 fd=13
 group_fd=11
 type=4
-config=33280
+config=33024
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-be-bound (0x8300)
+# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
 [event14:base-stat]
 fd=14
 group_fd=11
 type=4
-config=33536
+config=33280
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
+# PERF_TYPE_RAW / topdown-be-bound (0x8300)
 [event15:base-stat]
 fd=15
 group_fd=11
 type=4
-config=33024
+config=33536
 disabled=0
 enable_on_exec=0
 read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
+# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
 [event16:base-stat]
 fd=16
+group_fd=11
 type=4
-config=4109
+config=33792
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
+# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
 [event17:base-stat]
 fd=17
+group_fd=11
 type=4
-config=17039629
+config=34048
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
+# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
 [event18:base-stat]
 fd=18
+group_fd=11
 type=4
-config=60
+config=34304
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
+# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
 [event19:base-stat]
 fd=19
+group_fd=11
 type=4
-config=2097421
+config=34560
+disabled=0
+enable_on_exec=0
+read_format=15
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
+# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
 [event20:base-stat]
 fd=20
 type=4
-config=316
+config=4109
 optional=1
 
-# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
 [event21:base-stat]
 fd=21
 type=4
-config=412
+config=17039629
 optional=1
 
-# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
 [event22:base-stat]
 fd=22
 type=4
-config=572
+config=60
 optional=1
 
-# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
 [event23:base-stat]
 fd=23
 type=4
-config=706
+config=2097421
 optional=1
 
-# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
 [event24:base-stat]
 fd=24
 type=4
+config=316
+optional=1
+
+# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
+[event25:base-stat]
+fd=25
+type=4
+config=412
+optional=1
+
+# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
+[event26:base-stat]
+fd=26
+type=4
+config=572
+optional=1
+
+# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
+[event27:base-stat]
+fd=27
+type=4
+config=706
+optional=1
+
+# PERF_TYPE_RAW / UOPS_ISSUED.ANY
+[event28:base-stat]
+fd=28
+type=4
 config=270
 optional=1
 
@@ -190,8 +234,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event25:base-stat]
-fd=25
+[event29:base-stat]
+fd=29
 type=3
 config=0
 optional=1
@@ -200,8 +244,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event26:base-stat]
-fd=26
+[event30:base-stat]
+fd=30
 type=3
 config=65536
 optional=1
@@ -210,8 +254,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event27:base-stat]
-fd=27
+[event31:base-stat]
+fd=31
 type=3
 config=2
 optional=1
@@ -220,8 +264,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event28:base-stat]
-fd=28
+[event32:base-stat]
+fd=32
 type=3
 config=65538
 optional=1
@@ -230,8 +274,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event29:base-stat]
-fd=29
+[event33:base-stat]
+fd=33
 type=3
 config=1
 optional=1
@@ -240,8 +284,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event30:base-stat]
-fd=30
+[event34:base-stat]
+fd=34
 type=3
 config=65537
 optional=1
@@ -250,8 +294,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event31:base-stat]
-fd=31
+[event35:base-stat]
+fd=35
 type=3
 config=3
 optional=1
@@ -260,8 +304,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event32:base-stat]
-fd=32
+[event36:base-stat]
+fd=36
 type=3
 config=65539
 optional=1
@@ -270,8 +314,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event33:base-stat]
-fd=33
+[event37:base-stat]
+fd=37
 type=3
 config=4
 optional=1
@@ -280,8 +324,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event34:base-stat]
-fd=34
+[event38:base-stat]
+fd=38
 type=3
 config=65540
 optional=1
@@ -290,8 +334,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
-[event35:base-stat]
-fd=35
+[event39:base-stat]
+fd=39
 type=3
 config=512
 optional=1
@@ -300,8 +344,8 @@ optional=1
 #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
 # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
 # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
-[event36:base-stat]
-fd=36
+[event40:base-stat]
+fd=40
 type=3
 config=66048
 optional=1
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf test attr: Add back missing topdown events
  2024-03-11  8:16 vmolnaro
@ 2024-03-20 12:16 ` Michael Petlan
  2024-08-12 13:25   ` Arnaldo Carvalho de Melo
  2024-10-04 19:29 ` Namhyung Kim
  1 sibling, 1 reply; 10+ messages in thread
From: Michael Petlan @ 2024-03-20 12:16 UTC (permalink / raw)
  To: vmolnaro; +Cc: linux-perf-users, acme, acme, irogers

Hello Ian,
we've resent this patch, as the previous discussion about this
was unfinished somehow, if I remember correctly. Is this fix
acceptable?
Thank you!
Michael

On Mon, 11 Mar 2024, vmolnaro@redhat.com wrote:
> From: Veronika Molnarova <vmolnaro@redhat.com>
> 
> With the patch 0b6c5371c03c "Add missing topdown metrics events" eight
> topdown metric events with numbers ranging from 0x8000 to 0x8700 were
> added to the test since they were added as 'perf stat' default events.
> Later the patch 951efb9976ce "Update no event/metric expectations" kept
> only 4 of those events(0x8000-0x8300).
> 
> Currently, the topdown events with numbers 0x8400 to 0x8700 are missing
> from the list of expected events resulting in a failure. Add back the
> missing topdown events.
> 
> Fixes: 951efb9976ce ("perf test attr: Update no event/metric expectations")
> Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
> ---
>  tools/perf/tests/attr/test-stat-default    |  90 ++++++++++----
>  tools/perf/tests/attr/test-stat-detailed-1 | 106 +++++++++++-----
>  tools/perf/tests/attr/test-stat-detailed-2 | 130 ++++++++++++-------
>  tools/perf/tests/attr/test-stat-detailed-3 | 138 ++++++++++++++-------
>  4 files changed, 320 insertions(+), 144 deletions(-)
> 
> diff --git a/tools/perf/tests/attr/test-stat-default b/tools/perf/tests/attr/test-stat-default
> index a1e2da0a9a6d..e47fb4944679 100644
> --- a/tools/perf/tests/attr/test-stat-default
> +++ b/tools/perf/tests/attr/test-stat-default
> @@ -88,98 +88,142 @@ enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>  [event13:base-stat]
>  fd=13
>  group_fd=11
>  type=4
> -config=33280
> +config=33024
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>  [event14:base-stat]
>  fd=14
>  group_fd=11
>  type=4
> -config=33536
> +config=33280
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>  [event15:base-stat]
>  fd=15
>  group_fd=11
>  type=4
> -config=33024
> +config=33536
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
>  [event16:base-stat]
>  fd=16
> +group_fd=11
>  type=4
> -config=4109
> +config=33792
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>  [event17:base-stat]
>  fd=17
> +group_fd=11
>  type=4
> -config=17039629
> +config=34048
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>  [event18:base-stat]
>  fd=18
> +group_fd=11
>  type=4
> -config=60
> +config=34304
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>  [event19:base-stat]
>  fd=19
> +group_fd=11
>  type=4
> -config=2097421
> +config=34560
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>  [event20:base-stat]
>  fd=20
>  type=4
> -config=316
> +config=4109
>  optional=1
>  
> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>  [event21:base-stat]
>  fd=21
>  type=4
> -config=412
> +config=17039629
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>  [event22:base-stat]
>  fd=22
>  type=4
> -config=572
> +config=60
>  optional=1
>  
> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>  [event23:base-stat]
>  fd=23
>  type=4
> -config=706
> +config=2097421
>  optional=1
>  
> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>  [event24:base-stat]
>  fd=24
>  type=4
> +config=316
> +optional=1
> +
> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +[event25:base-stat]
> +fd=25
> +type=4
> +config=412
> +optional=1
> +
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +[event26:base-stat]
> +fd=26
> +type=4
> +config=572
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +[event27:base-stat]
> +fd=27
> +type=4
> +config=706
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +[event28:base-stat]
> +fd=28
> +type=4
>  config=270
>  optional=1
> diff --git a/tools/perf/tests/attr/test-stat-detailed-1 b/tools/perf/tests/attr/test-stat-detailed-1
> index 1c52cb05c900..3d500d3e0c5c 100644
> --- a/tools/perf/tests/attr/test-stat-detailed-1
> +++ b/tools/perf/tests/attr/test-stat-detailed-1
> @@ -90,99 +90,143 @@ enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>  [event13:base-stat]
>  fd=13
>  group_fd=11
>  type=4
> -config=33280
> +config=33024
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>  [event14:base-stat]
>  fd=14
>  group_fd=11
>  type=4
> -config=33536
> +config=33280
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>  [event15:base-stat]
>  fd=15
>  group_fd=11
>  type=4
> -config=33024
> +config=33536
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
>  [event16:base-stat]
>  fd=16
> +group_fd=11
>  type=4
> -config=4109
> +config=33792
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>  [event17:base-stat]
>  fd=17
> +group_fd=11
>  type=4
> -config=17039629
> +config=34048
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>  [event18:base-stat]
>  fd=18
> +group_fd=11
>  type=4
> -config=60
> +config=34304
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>  [event19:base-stat]
>  fd=19
> +group_fd=11
>  type=4
> -config=2097421
> +config=34560
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>  [event20:base-stat]
>  fd=20
>  type=4
> -config=316
> +config=4109
>  optional=1
>  
> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>  [event21:base-stat]
>  fd=21
>  type=4
> -config=412
> +config=17039629
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>  [event22:base-stat]
>  fd=22
>  type=4
> -config=572
> +config=60
>  optional=1
>  
> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>  [event23:base-stat]
>  fd=23
>  type=4
> -config=706
> +config=2097421
>  optional=1
>  
> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>  [event24:base-stat]
>  fd=24
>  type=4
> +config=316
> +optional=1
> +
> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +[event25:base-stat]
> +fd=25
> +type=4
> +config=412
> +optional=1
> +
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +[event26:base-stat]
> +fd=26
> +type=4
> +config=572
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +[event27:base-stat]
> +fd=27
> +type=4
> +config=706
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +[event28:base-stat]
> +fd=28
> +type=4
>  config=270
>  optional=1
>  
> @@ -190,8 +234,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event25:base-stat]
> -fd=25
> +[event29:base-stat]
> +fd=29
>  type=3
>  config=0
>  optional=1
> @@ -200,8 +244,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event26:base-stat]
> -fd=26
> +[event30:base-stat]
> +fd=30
>  type=3
>  config=65536
>  optional=1
> @@ -210,8 +254,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event27:base-stat]
> -fd=27
> +[event31:base-stat]
> +fd=31
>  type=3
>  config=2
>  optional=1
> @@ -220,8 +264,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event28:base-stat]
> -fd=28
> +[event32:base-stat]
> +fd=32
>  type=3
>  config=65538
>  optional=1
> diff --git a/tools/perf/tests/attr/test-stat-detailed-2 b/tools/perf/tests/attr/test-stat-detailed-2
> index 7e961d24a885..01777a63752f 100644
> --- a/tools/perf/tests/attr/test-stat-detailed-2
> +++ b/tools/perf/tests/attr/test-stat-detailed-2
> @@ -90,99 +90,143 @@ enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>  [event13:base-stat]
>  fd=13
>  group_fd=11
>  type=4
> -config=33280
> +config=33024
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>  [event14:base-stat]
>  fd=14
>  group_fd=11
>  type=4
> -config=33536
> +config=33280
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>  [event15:base-stat]
>  fd=15
>  group_fd=11
>  type=4
> -config=33024
> +config=33536
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
>  [event16:base-stat]
>  fd=16
> +group_fd=11
>  type=4
> -config=4109
> +config=33792
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>  [event17:base-stat]
>  fd=17
> +group_fd=11
>  type=4
> -config=17039629
> +config=34048
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>  [event18:base-stat]
>  fd=18
> +group_fd=11
>  type=4
> -config=60
> +config=34304
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>  [event19:base-stat]
>  fd=19
> +group_fd=11
>  type=4
> -config=2097421
> +config=34560
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>  [event20:base-stat]
>  fd=20
>  type=4
> -config=316
> +config=4109
>  optional=1
>  
> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>  [event21:base-stat]
>  fd=21
>  type=4
> -config=412
> +config=17039629
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>  [event22:base-stat]
>  fd=22
>  type=4
> -config=572
> +config=60
>  optional=1
>  
> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>  [event23:base-stat]
>  fd=23
>  type=4
> -config=706
> +config=2097421
>  optional=1
>  
> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>  [event24:base-stat]
>  fd=24
>  type=4
> +config=316
> +optional=1
> +
> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +[event25:base-stat]
> +fd=25
> +type=4
> +config=412
> +optional=1
> +
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +[event26:base-stat]
> +fd=26
> +type=4
> +config=572
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +[event27:base-stat]
> +fd=27
> +type=4
> +config=706
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +[event28:base-stat]
> +fd=28
> +type=4
>  config=270
>  optional=1
>  
> @@ -190,8 +234,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event25:base-stat]
> -fd=25
> +[event29:base-stat]
> +fd=29
>  type=3
>  config=0
>  optional=1
> @@ -200,8 +244,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event26:base-stat]
> -fd=26
> +[event30:base-stat]
> +fd=30
>  type=3
>  config=65536
>  optional=1
> @@ -210,8 +254,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event27:base-stat]
> -fd=27
> +[event31:base-stat]
> +fd=31
>  type=3
>  config=2
>  optional=1
> @@ -220,8 +264,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event28:base-stat]
> -fd=28
> +[event32:base-stat]
> +fd=32
>  type=3
>  config=65538
>  optional=1
> @@ -230,8 +274,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event29:base-stat]
> -fd=29
> +[event33:base-stat]
> +fd=33
>  type=3
>  config=1
>  optional=1
> @@ -240,8 +284,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event30:base-stat]
> -fd=30
> +[event34:base-stat]
> +fd=34
>  type=3
>  config=65537
>  optional=1
> @@ -250,8 +294,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event31:base-stat]
> -fd=31
> +[event35:base-stat]
> +fd=35
>  type=3
>  config=3
>  optional=1
> @@ -260,8 +304,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event32:base-stat]
> -fd=32
> +[event36:base-stat]
> +fd=36
>  type=3
>  config=65539
>  optional=1
> @@ -270,8 +314,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event33:base-stat]
> -fd=33
> +[event37:base-stat]
> +fd=37
>  type=3
>  config=4
>  optional=1
> @@ -280,8 +324,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event34:base-stat]
> -fd=34
> +[event38:base-stat]
> +fd=38
>  type=3
>  config=65540
>  optional=1
> diff --git a/tools/perf/tests/attr/test-stat-detailed-3 b/tools/perf/tests/attr/test-stat-detailed-3
> index e50535f45977..8400abd7e1e4 100644
> --- a/tools/perf/tests/attr/test-stat-detailed-3
> +++ b/tools/perf/tests/attr/test-stat-detailed-3
> @@ -90,99 +90,143 @@ enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>  [event13:base-stat]
>  fd=13
>  group_fd=11
>  type=4
> -config=33280
> +config=33024
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>  [event14:base-stat]
>  fd=14
>  group_fd=11
>  type=4
> -config=33536
> +config=33280
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>  [event15:base-stat]
>  fd=15
>  group_fd=11
>  type=4
> -config=33024
> +config=33536
>  disabled=0
>  enable_on_exec=0
>  read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
>  [event16:base-stat]
>  fd=16
> +group_fd=11
>  type=4
> -config=4109
> +config=33792
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>  [event17:base-stat]
>  fd=17
> +group_fd=11
>  type=4
> -config=17039629
> +config=34048
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>  [event18:base-stat]
>  fd=18
> +group_fd=11
>  type=4
> -config=60
> +config=34304
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>  [event19:base-stat]
>  fd=19
> +group_fd=11
>  type=4
> -config=2097421
> +config=34560
> +disabled=0
> +enable_on_exec=0
> +read_format=15
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>  [event20:base-stat]
>  fd=20
>  type=4
> -config=316
> +config=4109
>  optional=1
>  
> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>  [event21:base-stat]
>  fd=21
>  type=4
> -config=412
> +config=17039629
>  optional=1
>  
> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>  [event22:base-stat]
>  fd=22
>  type=4
> -config=572
> +config=60
>  optional=1
>  
> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>  [event23:base-stat]
>  fd=23
>  type=4
> -config=706
> +config=2097421
>  optional=1
>  
> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>  [event24:base-stat]
>  fd=24
>  type=4
> +config=316
> +optional=1
> +
> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> +[event25:base-stat]
> +fd=25
> +type=4
> +config=412
> +optional=1
> +
> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> +[event26:base-stat]
> +fd=26
> +type=4
> +config=572
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> +[event27:base-stat]
> +fd=27
> +type=4
> +config=706
> +optional=1
> +
> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> +[event28:base-stat]
> +fd=28
> +type=4
>  config=270
>  optional=1
>  
> @@ -190,8 +234,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event25:base-stat]
> -fd=25
> +[event29:base-stat]
> +fd=29
>  type=3
>  config=0
>  optional=1
> @@ -200,8 +244,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event26:base-stat]
> -fd=26
> +[event30:base-stat]
> +fd=30
>  type=3
>  config=65536
>  optional=1
> @@ -210,8 +254,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event27:base-stat]
> -fd=27
> +[event31:base-stat]
> +fd=31
>  type=3
>  config=2
>  optional=1
> @@ -220,8 +264,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event28:base-stat]
> -fd=28
> +[event32:base-stat]
> +fd=32
>  type=3
>  config=65538
>  optional=1
> @@ -230,8 +274,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event29:base-stat]
> -fd=29
> +[event33:base-stat]
> +fd=33
>  type=3
>  config=1
>  optional=1
> @@ -240,8 +284,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event30:base-stat]
> -fd=30
> +[event34:base-stat]
> +fd=34
>  type=3
>  config=65537
>  optional=1
> @@ -250,8 +294,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event31:base-stat]
> -fd=31
> +[event35:base-stat]
> +fd=35
>  type=3
>  config=3
>  optional=1
> @@ -260,8 +304,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event32:base-stat]
> -fd=32
> +[event36:base-stat]
> +fd=36
>  type=3
>  config=65539
>  optional=1
> @@ -270,8 +314,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event33:base-stat]
> -fd=33
> +[event37:base-stat]
> +fd=37
>  type=3
>  config=4
>  optional=1
> @@ -280,8 +324,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event34:base-stat]
> -fd=34
> +[event38:base-stat]
> +fd=38
>  type=3
>  config=65540
>  optional=1
> @@ -290,8 +334,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> -[event35:base-stat]
> -fd=35
> +[event39:base-stat]
> +fd=39
>  type=3
>  config=512
>  optional=1
> @@ -300,8 +344,8 @@ optional=1
>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> -[event36:base-stat]
> -fd=36
> +[event40:base-stat]
> +fd=40
>  type=3
>  config=66048
>  optional=1
> -- 
> 2.43.0
> 
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf test attr: Add back missing topdown events
  2024-03-20 12:16 ` Michael Petlan
@ 2024-08-12 13:25   ` Arnaldo Carvalho de Melo
  2024-10-01  8:48     ` Veronika Molnarova
  0 siblings, 1 reply; 10+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-08-12 13:25 UTC (permalink / raw)
  To: Ian Rogers, Michael Petlan
  Cc: vmolnaro, linux-perf-users, acme, Namhyung Kim, Kan Liang,
	Jiri Olsa, Adrian Hunter, Linux Kernel Mailing List

On Wed, Mar 20, 2024 at 01:16:48PM +0100, Michael Petlan wrote:
> Hello Ian,
> we've resent this patch, as the previous discussion about this
> was unfinished somehow, if I remember correctly. Is this fix
> acceptable?
> Thank you!
> Michael

Ian,

	I think this fell thru the cracks, do you have something to add?

- Arnaldo
 
> On Mon, 11 Mar 2024, vmolnaro@redhat.com wrote:
> > From: Veronika Molnarova <vmolnaro@redhat.com>
> > 
> > With the patch 0b6c5371c03c "Add missing topdown metrics events" eight
> > topdown metric events with numbers ranging from 0x8000 to 0x8700 were
> > added to the test since they were added as 'perf stat' default events.
> > Later the patch 951efb9976ce "Update no event/metric expectations" kept
> > only 4 of those events(0x8000-0x8300).
> > 
> > Currently, the topdown events with numbers 0x8400 to 0x8700 are missing
> > from the list of expected events resulting in a failure. Add back the
> > missing topdown events.
> > 
> > Fixes: 951efb9976ce ("perf test attr: Update no event/metric expectations")
> > Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
> > ---
> >  tools/perf/tests/attr/test-stat-default    |  90 ++++++++++----
> >  tools/perf/tests/attr/test-stat-detailed-1 | 106 +++++++++++-----
> >  tools/perf/tests/attr/test-stat-detailed-2 | 130 ++++++++++++-------
> >  tools/perf/tests/attr/test-stat-detailed-3 | 138 ++++++++++++++-------
> >  4 files changed, 320 insertions(+), 144 deletions(-)
> > 
> > diff --git a/tools/perf/tests/attr/test-stat-default b/tools/perf/tests/attr/test-stat-default
> > index a1e2da0a9a6d..e47fb4944679 100644
> > --- a/tools/perf/tests/attr/test-stat-default
> > +++ b/tools/perf/tests/attr/test-stat-default
> > @@ -88,98 +88,142 @@ enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >  [event13:base-stat]
> >  fd=13
> >  group_fd=11
> >  type=4
> > -config=33280
> > +config=33024
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >  [event14:base-stat]
> >  fd=14
> >  group_fd=11
> >  type=4
> > -config=33536
> > +config=33280
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >  [event15:base-stat]
> >  fd=15
> >  group_fd=11
> >  type=4
> > -config=33024
> > +config=33536
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> >  [event16:base-stat]
> >  fd=16
> > +group_fd=11
> >  type=4
> > -config=4109
> > +config=33792
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >  [event17:base-stat]
> >  fd=17
> > +group_fd=11
> >  type=4
> > -config=17039629
> > +config=34048
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >  [event18:base-stat]
> >  fd=18
> > +group_fd=11
> >  type=4
> > -config=60
> > +config=34304
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >  [event19:base-stat]
> >  fd=19
> > +group_fd=11
> >  type=4
> > -config=2097421
> > +config=34560
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >  [event20:base-stat]
> >  fd=20
> >  type=4
> > -config=316
> > +config=4109
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >  [event21:base-stat]
> >  fd=21
> >  type=4
> > -config=412
> > +config=17039629
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >  [event22:base-stat]
> >  fd=22
> >  type=4
> > -config=572
> > +config=60
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >  [event23:base-stat]
> >  fd=23
> >  type=4
> > -config=706
> > +config=2097421
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >  [event24:base-stat]
> >  fd=24
> >  type=4
> > +config=316
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +[event25:base-stat]
> > +fd=25
> > +type=4
> > +config=412
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +[event26:base-stat]
> > +fd=26
> > +type=4
> > +config=572
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +[event27:base-stat]
> > +fd=27
> > +type=4
> > +config=706
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +[event28:base-stat]
> > +fd=28
> > +type=4
> >  config=270
> >  optional=1
> > diff --git a/tools/perf/tests/attr/test-stat-detailed-1 b/tools/perf/tests/attr/test-stat-detailed-1
> > index 1c52cb05c900..3d500d3e0c5c 100644
> > --- a/tools/perf/tests/attr/test-stat-detailed-1
> > +++ b/tools/perf/tests/attr/test-stat-detailed-1
> > @@ -90,99 +90,143 @@ enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >  [event13:base-stat]
> >  fd=13
> >  group_fd=11
> >  type=4
> > -config=33280
> > +config=33024
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >  [event14:base-stat]
> >  fd=14
> >  group_fd=11
> >  type=4
> > -config=33536
> > +config=33280
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >  [event15:base-stat]
> >  fd=15
> >  group_fd=11
> >  type=4
> > -config=33024
> > +config=33536
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> >  [event16:base-stat]
> >  fd=16
> > +group_fd=11
> >  type=4
> > -config=4109
> > +config=33792
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >  [event17:base-stat]
> >  fd=17
> > +group_fd=11
> >  type=4
> > -config=17039629
> > +config=34048
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >  [event18:base-stat]
> >  fd=18
> > +group_fd=11
> >  type=4
> > -config=60
> > +config=34304
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >  [event19:base-stat]
> >  fd=19
> > +group_fd=11
> >  type=4
> > -config=2097421
> > +config=34560
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >  [event20:base-stat]
> >  fd=20
> >  type=4
> > -config=316
> > +config=4109
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >  [event21:base-stat]
> >  fd=21
> >  type=4
> > -config=412
> > +config=17039629
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >  [event22:base-stat]
> >  fd=22
> >  type=4
> > -config=572
> > +config=60
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >  [event23:base-stat]
> >  fd=23
> >  type=4
> > -config=706
> > +config=2097421
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >  [event24:base-stat]
> >  fd=24
> >  type=4
> > +config=316
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +[event25:base-stat]
> > +fd=25
> > +type=4
> > +config=412
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +[event26:base-stat]
> > +fd=26
> > +type=4
> > +config=572
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +[event27:base-stat]
> > +fd=27
> > +type=4
> > +config=706
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +[event28:base-stat]
> > +fd=28
> > +type=4
> >  config=270
> >  optional=1
> >  
> > @@ -190,8 +234,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event25:base-stat]
> > -fd=25
> > +[event29:base-stat]
> > +fd=29
> >  type=3
> >  config=0
> >  optional=1
> > @@ -200,8 +244,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event26:base-stat]
> > -fd=26
> > +[event30:base-stat]
> > +fd=30
> >  type=3
> >  config=65536
> >  optional=1
> > @@ -210,8 +254,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event27:base-stat]
> > -fd=27
> > +[event31:base-stat]
> > +fd=31
> >  type=3
> >  config=2
> >  optional=1
> > @@ -220,8 +264,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event28:base-stat]
> > -fd=28
> > +[event32:base-stat]
> > +fd=32
> >  type=3
> >  config=65538
> >  optional=1
> > diff --git a/tools/perf/tests/attr/test-stat-detailed-2 b/tools/perf/tests/attr/test-stat-detailed-2
> > index 7e961d24a885..01777a63752f 100644
> > --- a/tools/perf/tests/attr/test-stat-detailed-2
> > +++ b/tools/perf/tests/attr/test-stat-detailed-2
> > @@ -90,99 +90,143 @@ enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >  [event13:base-stat]
> >  fd=13
> >  group_fd=11
> >  type=4
> > -config=33280
> > +config=33024
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >  [event14:base-stat]
> >  fd=14
> >  group_fd=11
> >  type=4
> > -config=33536
> > +config=33280
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >  [event15:base-stat]
> >  fd=15
> >  group_fd=11
> >  type=4
> > -config=33024
> > +config=33536
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> >  [event16:base-stat]
> >  fd=16
> > +group_fd=11
> >  type=4
> > -config=4109
> > +config=33792
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >  [event17:base-stat]
> >  fd=17
> > +group_fd=11
> >  type=4
> > -config=17039629
> > +config=34048
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >  [event18:base-stat]
> >  fd=18
> > +group_fd=11
> >  type=4
> > -config=60
> > +config=34304
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >  [event19:base-stat]
> >  fd=19
> > +group_fd=11
> >  type=4
> > -config=2097421
> > +config=34560
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >  [event20:base-stat]
> >  fd=20
> >  type=4
> > -config=316
> > +config=4109
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >  [event21:base-stat]
> >  fd=21
> >  type=4
> > -config=412
> > +config=17039629
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >  [event22:base-stat]
> >  fd=22
> >  type=4
> > -config=572
> > +config=60
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >  [event23:base-stat]
> >  fd=23
> >  type=4
> > -config=706
> > +config=2097421
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >  [event24:base-stat]
> >  fd=24
> >  type=4
> > +config=316
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +[event25:base-stat]
> > +fd=25
> > +type=4
> > +config=412
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +[event26:base-stat]
> > +fd=26
> > +type=4
> > +config=572
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +[event27:base-stat]
> > +fd=27
> > +type=4
> > +config=706
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +[event28:base-stat]
> > +fd=28
> > +type=4
> >  config=270
> >  optional=1
> >  
> > @@ -190,8 +234,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event25:base-stat]
> > -fd=25
> > +[event29:base-stat]
> > +fd=29
> >  type=3
> >  config=0
> >  optional=1
> > @@ -200,8 +244,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event26:base-stat]
> > -fd=26
> > +[event30:base-stat]
> > +fd=30
> >  type=3
> >  config=65536
> >  optional=1
> > @@ -210,8 +254,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event27:base-stat]
> > -fd=27
> > +[event31:base-stat]
> > +fd=31
> >  type=3
> >  config=2
> >  optional=1
> > @@ -220,8 +264,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event28:base-stat]
> > -fd=28
> > +[event32:base-stat]
> > +fd=32
> >  type=3
> >  config=65538
> >  optional=1
> > @@ -230,8 +274,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event29:base-stat]
> > -fd=29
> > +[event33:base-stat]
> > +fd=33
> >  type=3
> >  config=1
> >  optional=1
> > @@ -240,8 +284,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event30:base-stat]
> > -fd=30
> > +[event34:base-stat]
> > +fd=34
> >  type=3
> >  config=65537
> >  optional=1
> > @@ -250,8 +294,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event31:base-stat]
> > -fd=31
> > +[event35:base-stat]
> > +fd=35
> >  type=3
> >  config=3
> >  optional=1
> > @@ -260,8 +304,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event32:base-stat]
> > -fd=32
> > +[event36:base-stat]
> > +fd=36
> >  type=3
> >  config=65539
> >  optional=1
> > @@ -270,8 +314,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event33:base-stat]
> > -fd=33
> > +[event37:base-stat]
> > +fd=37
> >  type=3
> >  config=4
> >  optional=1
> > @@ -280,8 +324,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event34:base-stat]
> > -fd=34
> > +[event38:base-stat]
> > +fd=38
> >  type=3
> >  config=65540
> >  optional=1
> > diff --git a/tools/perf/tests/attr/test-stat-detailed-3 b/tools/perf/tests/attr/test-stat-detailed-3
> > index e50535f45977..8400abd7e1e4 100644
> > --- a/tools/perf/tests/attr/test-stat-detailed-3
> > +++ b/tools/perf/tests/attr/test-stat-detailed-3
> > @@ -90,99 +90,143 @@ enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> > +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >  [event13:base-stat]
> >  fd=13
> >  group_fd=11
> >  type=4
> > -config=33280
> > +config=33024
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> > +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >  [event14:base-stat]
> >  fd=14
> >  group_fd=11
> >  type=4
> > -config=33536
> > +config=33280
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> > +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >  [event15:base-stat]
> >  fd=15
> >  group_fd=11
> >  type=4
> > -config=33024
> > +config=33536
> >  disabled=0
> >  enable_on_exec=0
> >  read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> > +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> >  [event16:base-stat]
> >  fd=16
> > +group_fd=11
> >  type=4
> > -config=4109
> > +config=33792
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> > +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >  [event17:base-stat]
> >  fd=17
> > +group_fd=11
> >  type=4
> > -config=17039629
> > +config=34048
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> > +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >  [event18:base-stat]
> >  fd=18
> > +group_fd=11
> >  type=4
> > -config=60
> > +config=34304
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> > +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >  [event19:base-stat]
> >  fd=19
> > +group_fd=11
> >  type=4
> > -config=2097421
> > +config=34560
> > +disabled=0
> > +enable_on_exec=0
> > +read_format=15
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> > +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >  [event20:base-stat]
> >  fd=20
> >  type=4
> > -config=316
> > +config=4109
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >  [event21:base-stat]
> >  fd=21
> >  type=4
> > -config=412
> > +config=17039629
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >  [event22:base-stat]
> >  fd=22
> >  type=4
> > -config=572
> > +config=60
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >  [event23:base-stat]
> >  fd=23
> >  type=4
> > -config=706
> > +config=2097421
> >  optional=1
> >  
> > -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >  [event24:base-stat]
> >  fd=24
> >  type=4
> > +config=316
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> > +[event25:base-stat]
> > +fd=25
> > +type=4
> > +config=412
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> > +[event26:base-stat]
> > +fd=26
> > +type=4
> > +config=572
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> > +[event27:base-stat]
> > +fd=27
> > +type=4
> > +config=706
> > +optional=1
> > +
> > +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> > +[event28:base-stat]
> > +fd=28
> > +type=4
> >  config=270
> >  optional=1
> >  
> > @@ -190,8 +234,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event25:base-stat]
> > -fd=25
> > +[event29:base-stat]
> > +fd=29
> >  type=3
> >  config=0
> >  optional=1
> > @@ -200,8 +244,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event26:base-stat]
> > -fd=26
> > +[event30:base-stat]
> > +fd=30
> >  type=3
> >  config=65536
> >  optional=1
> > @@ -210,8 +254,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event27:base-stat]
> > -fd=27
> > +[event31:base-stat]
> > +fd=31
> >  type=3
> >  config=2
> >  optional=1
> > @@ -220,8 +264,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event28:base-stat]
> > -fd=28
> > +[event32:base-stat]
> > +fd=32
> >  type=3
> >  config=65538
> >  optional=1
> > @@ -230,8 +274,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event29:base-stat]
> > -fd=29
> > +[event33:base-stat]
> > +fd=33
> >  type=3
> >  config=1
> >  optional=1
> > @@ -240,8 +284,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event30:base-stat]
> > -fd=30
> > +[event34:base-stat]
> > +fd=34
> >  type=3
> >  config=65537
> >  optional=1
> > @@ -250,8 +294,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event31:base-stat]
> > -fd=31
> > +[event35:base-stat]
> > +fd=35
> >  type=3
> >  config=3
> >  optional=1
> > @@ -260,8 +304,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event32:base-stat]
> > -fd=32
> > +[event36:base-stat]
> > +fd=36
> >  type=3
> >  config=65539
> >  optional=1
> > @@ -270,8 +314,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event33:base-stat]
> > -fd=33
> > +[event37:base-stat]
> > +fd=37
> >  type=3
> >  config=4
> >  optional=1
> > @@ -280,8 +324,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event34:base-stat]
> > -fd=34
> > +[event38:base-stat]
> > +fd=38
> >  type=3
> >  config=65540
> >  optional=1
> > @@ -290,8 +334,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> > -[event35:base-stat]
> > -fd=35
> > +[event39:base-stat]
> > +fd=39
> >  type=3
> >  config=512
> >  optional=1
> > @@ -300,8 +344,8 @@ optional=1
> >  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
> >  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> > -[event36:base-stat]
> > -fd=36
> > +[event40:base-stat]
> > +fd=40
> >  type=3
> >  config=66048
> >  optional=1
> > -- 
> > 2.43.0
> > 
> > 
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf test attr: Add back missing topdown events
  2024-08-12 13:25   ` Arnaldo Carvalho de Melo
@ 2024-10-01  8:48     ` Veronika Molnarova
  2024-10-01 16:54       ` Ian Rogers
  0 siblings, 1 reply; 10+ messages in thread
From: Veronika Molnarova @ 2024-10-01  8:48 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ian Rogers, Michael Petlan
  Cc: linux-perf-users, acme, Namhyung Kim, Kan Liang, Jiri Olsa,
	Adrian Hunter, Linux Kernel Mailing List



On 8/12/24 15:25, Arnaldo Carvalho de Melo wrote:
> On Wed, Mar 20, 2024 at 01:16:48PM +0100, Michael Petlan wrote:
>> Hello Ian,
>> we've resent this patch, as the previous discussion about this
>> was unfinished somehow, if I remember correctly. Is this fix
>> acceptable?
>> Thank you!
>> Michael
> 
> Ian,
> 
> 	I think this fell thru the cracks, do you have something to add?
> 
> - Arnaldo
>  
Hi Ian,

do you have anything to add to this patch so that the issue
could be resolved?

Thanks,
Veronika
>> On Mon, 11 Mar 2024, vmolnaro@redhat.com wrote:
>>> From: Veronika Molnarova <vmolnaro@redhat.com>
>>>
>>> With the patch 0b6c5371c03c "Add missing topdown metrics events" eight
>>> topdown metric events with numbers ranging from 0x8000 to 0x8700 were
>>> added to the test since they were added as 'perf stat' default events.
>>> Later the patch 951efb9976ce "Update no event/metric expectations" kept
>>> only 4 of those events(0x8000-0x8300).
>>>
>>> Currently, the topdown events with numbers 0x8400 to 0x8700 are missing
>>> from the list of expected events resulting in a failure. Add back the
>>> missing topdown events.
>>>
>>> Fixes: 951efb9976ce ("perf test attr: Update no event/metric expectations")
>>> Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
>>> ---
>>>  tools/perf/tests/attr/test-stat-default    |  90 ++++++++++----
>>>  tools/perf/tests/attr/test-stat-detailed-1 | 106 +++++++++++-----
>>>  tools/perf/tests/attr/test-stat-detailed-2 | 130 ++++++++++++-------
>>>  tools/perf/tests/attr/test-stat-detailed-3 | 138 ++++++++++++++-------
>>>  4 files changed, 320 insertions(+), 144 deletions(-)
>>>
>>> diff --git a/tools/perf/tests/attr/test-stat-default b/tools/perf/tests/attr/test-stat-default
>>> index a1e2da0a9a6d..e47fb4944679 100644
>>> --- a/tools/perf/tests/attr/test-stat-default
>>> +++ b/tools/perf/tests/attr/test-stat-default
>>> @@ -88,98 +88,142 @@ enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>>> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>>>  [event13:base-stat]
>>>  fd=13
>>>  group_fd=11
>>>  type=4
>>> -config=33280
>>> +config=33024
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>>> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>>>  [event14:base-stat]
>>>  fd=14
>>>  group_fd=11
>>>  type=4
>>> -config=33536
>>> +config=33280
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>>> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>>>  [event15:base-stat]
>>>  fd=15
>>>  group_fd=11
>>>  type=4
>>> -config=33024
>>> +config=33536
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>>> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
>>>  [event16:base-stat]
>>>  fd=16
>>> +group_fd=11
>>>  type=4
>>> -config=4109
>>> +config=33792
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>>> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>>>  [event17:base-stat]
>>>  fd=17
>>> +group_fd=11
>>>  type=4
>>> -config=17039629
>>> +config=34048
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>>> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>>>  [event18:base-stat]
>>>  fd=18
>>> +group_fd=11
>>>  type=4
>>> -config=60
>>> +config=34304
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>>> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>>>  [event19:base-stat]
>>>  fd=19
>>> +group_fd=11
>>>  type=4
>>> -config=2097421
>>> +config=34560
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>>> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>>>  [event20:base-stat]
>>>  fd=20
>>>  type=4
>>> -config=316
>>> +config=4109
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
>>> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>>>  [event21:base-stat]
>>>  fd=21
>>>  type=4
>>> -config=412
>>> +config=17039629
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>>>  [event22:base-stat]
>>>  fd=22
>>>  type=4
>>> -config=572
>>> +config=60
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
>>> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>>>  [event23:base-stat]
>>>  fd=23
>>>  type=4
>>> -config=706
>>> +config=2097421
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>>>  [event24:base-stat]
>>>  fd=24
>>>  type=4
>>> +config=316
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
>>> +[event25:base-stat]
>>> +fd=25
>>> +type=4
>>> +config=412
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
>>> +[event26:base-stat]
>>> +fd=26
>>> +type=4
>>> +config=572
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
>>> +[event27:base-stat]
>>> +fd=27
>>> +type=4
>>> +config=706
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
>>> +[event28:base-stat]
>>> +fd=28
>>> +type=4
>>>  config=270
>>>  optional=1
>>> diff --git a/tools/perf/tests/attr/test-stat-detailed-1 b/tools/perf/tests/attr/test-stat-detailed-1
>>> index 1c52cb05c900..3d500d3e0c5c 100644
>>> --- a/tools/perf/tests/attr/test-stat-detailed-1
>>> +++ b/tools/perf/tests/attr/test-stat-detailed-1
>>> @@ -90,99 +90,143 @@ enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>>> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>>>  [event13:base-stat]
>>>  fd=13
>>>  group_fd=11
>>>  type=4
>>> -config=33280
>>> +config=33024
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>>> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>>>  [event14:base-stat]
>>>  fd=14
>>>  group_fd=11
>>>  type=4
>>> -config=33536
>>> +config=33280
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>>> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>>>  [event15:base-stat]
>>>  fd=15
>>>  group_fd=11
>>>  type=4
>>> -config=33024
>>> +config=33536
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>>> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
>>>  [event16:base-stat]
>>>  fd=16
>>> +group_fd=11
>>>  type=4
>>> -config=4109
>>> +config=33792
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>>> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>>>  [event17:base-stat]
>>>  fd=17
>>> +group_fd=11
>>>  type=4
>>> -config=17039629
>>> +config=34048
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>>> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>>>  [event18:base-stat]
>>>  fd=18
>>> +group_fd=11
>>>  type=4
>>> -config=60
>>> +config=34304
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>>> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>>>  [event19:base-stat]
>>>  fd=19
>>> +group_fd=11
>>>  type=4
>>> -config=2097421
>>> +config=34560
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>>> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>>>  [event20:base-stat]
>>>  fd=20
>>>  type=4
>>> -config=316
>>> +config=4109
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
>>> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>>>  [event21:base-stat]
>>>  fd=21
>>>  type=4
>>> -config=412
>>> +config=17039629
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>>>  [event22:base-stat]
>>>  fd=22
>>>  type=4
>>> -config=572
>>> +config=60
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
>>> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>>>  [event23:base-stat]
>>>  fd=23
>>>  type=4
>>> -config=706
>>> +config=2097421
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>>>  [event24:base-stat]
>>>  fd=24
>>>  type=4
>>> +config=316
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
>>> +[event25:base-stat]
>>> +fd=25
>>> +type=4
>>> +config=412
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
>>> +[event26:base-stat]
>>> +fd=26
>>> +type=4
>>> +config=572
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
>>> +[event27:base-stat]
>>> +fd=27
>>> +type=4
>>> +config=706
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
>>> +[event28:base-stat]
>>> +fd=28
>>> +type=4
>>>  config=270
>>>  optional=1
>>>  
>>> @@ -190,8 +234,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event25:base-stat]
>>> -fd=25
>>> +[event29:base-stat]
>>> +fd=29
>>>  type=3
>>>  config=0
>>>  optional=1
>>> @@ -200,8 +244,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event26:base-stat]
>>> -fd=26
>>> +[event30:base-stat]
>>> +fd=30
>>>  type=3
>>>  config=65536
>>>  optional=1
>>> @@ -210,8 +254,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event27:base-stat]
>>> -fd=27
>>> +[event31:base-stat]
>>> +fd=31
>>>  type=3
>>>  config=2
>>>  optional=1
>>> @@ -220,8 +264,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event28:base-stat]
>>> -fd=28
>>> +[event32:base-stat]
>>> +fd=32
>>>  type=3
>>>  config=65538
>>>  optional=1
>>> diff --git a/tools/perf/tests/attr/test-stat-detailed-2 b/tools/perf/tests/attr/test-stat-detailed-2
>>> index 7e961d24a885..01777a63752f 100644
>>> --- a/tools/perf/tests/attr/test-stat-detailed-2
>>> +++ b/tools/perf/tests/attr/test-stat-detailed-2
>>> @@ -90,99 +90,143 @@ enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>>> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>>>  [event13:base-stat]
>>>  fd=13
>>>  group_fd=11
>>>  type=4
>>> -config=33280
>>> +config=33024
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>>> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>>>  [event14:base-stat]
>>>  fd=14
>>>  group_fd=11
>>>  type=4
>>> -config=33536
>>> +config=33280
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>>> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>>>  [event15:base-stat]
>>>  fd=15
>>>  group_fd=11
>>>  type=4
>>> -config=33024
>>> +config=33536
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>>> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
>>>  [event16:base-stat]
>>>  fd=16
>>> +group_fd=11
>>>  type=4
>>> -config=4109
>>> +config=33792
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>>> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>>>  [event17:base-stat]
>>>  fd=17
>>> +group_fd=11
>>>  type=4
>>> -config=17039629
>>> +config=34048
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>>> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>>>  [event18:base-stat]
>>>  fd=18
>>> +group_fd=11
>>>  type=4
>>> -config=60
>>> +config=34304
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>>> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>>>  [event19:base-stat]
>>>  fd=19
>>> +group_fd=11
>>>  type=4
>>> -config=2097421
>>> +config=34560
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>>> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>>>  [event20:base-stat]
>>>  fd=20
>>>  type=4
>>> -config=316
>>> +config=4109
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
>>> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>>>  [event21:base-stat]
>>>  fd=21
>>>  type=4
>>> -config=412
>>> +config=17039629
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>>>  [event22:base-stat]
>>>  fd=22
>>>  type=4
>>> -config=572
>>> +config=60
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
>>> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>>>  [event23:base-stat]
>>>  fd=23
>>>  type=4
>>> -config=706
>>> +config=2097421
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>>>  [event24:base-stat]
>>>  fd=24
>>>  type=4
>>> +config=316
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
>>> +[event25:base-stat]
>>> +fd=25
>>> +type=4
>>> +config=412
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
>>> +[event26:base-stat]
>>> +fd=26
>>> +type=4
>>> +config=572
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
>>> +[event27:base-stat]
>>> +fd=27
>>> +type=4
>>> +config=706
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
>>> +[event28:base-stat]
>>> +fd=28
>>> +type=4
>>>  config=270
>>>  optional=1
>>>  
>>> @@ -190,8 +234,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event25:base-stat]
>>> -fd=25
>>> +[event29:base-stat]
>>> +fd=29
>>>  type=3
>>>  config=0
>>>  optional=1
>>> @@ -200,8 +244,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event26:base-stat]
>>> -fd=26
>>> +[event30:base-stat]
>>> +fd=30
>>>  type=3
>>>  config=65536
>>>  optional=1
>>> @@ -210,8 +254,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event27:base-stat]
>>> -fd=27
>>> +[event31:base-stat]
>>> +fd=31
>>>  type=3
>>>  config=2
>>>  optional=1
>>> @@ -220,8 +264,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event28:base-stat]
>>> -fd=28
>>> +[event32:base-stat]
>>> +fd=32
>>>  type=3
>>>  config=65538
>>>  optional=1
>>> @@ -230,8 +274,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event29:base-stat]
>>> -fd=29
>>> +[event33:base-stat]
>>> +fd=33
>>>  type=3
>>>  config=1
>>>  optional=1
>>> @@ -240,8 +284,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event30:base-stat]
>>> -fd=30
>>> +[event34:base-stat]
>>> +fd=34
>>>  type=3
>>>  config=65537
>>>  optional=1
>>> @@ -250,8 +294,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event31:base-stat]
>>> -fd=31
>>> +[event35:base-stat]
>>> +fd=35
>>>  type=3
>>>  config=3
>>>  optional=1
>>> @@ -260,8 +304,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event32:base-stat]
>>> -fd=32
>>> +[event36:base-stat]
>>> +fd=36
>>>  type=3
>>>  config=65539
>>>  optional=1
>>> @@ -270,8 +314,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event33:base-stat]
>>> -fd=33
>>> +[event37:base-stat]
>>> +fd=37
>>>  type=3
>>>  config=4
>>>  optional=1
>>> @@ -280,8 +324,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event34:base-stat]
>>> -fd=34
>>> +[event38:base-stat]
>>> +fd=38
>>>  type=3
>>>  config=65540
>>>  optional=1
>>> diff --git a/tools/perf/tests/attr/test-stat-detailed-3 b/tools/perf/tests/attr/test-stat-detailed-3
>>> index e50535f45977..8400abd7e1e4 100644
>>> --- a/tools/perf/tests/attr/test-stat-detailed-3
>>> +++ b/tools/perf/tests/attr/test-stat-detailed-3
>>> @@ -90,99 +90,143 @@ enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>>> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>>>  [event13:base-stat]
>>>  fd=13
>>>  group_fd=11
>>>  type=4
>>> -config=33280
>>> +config=33024
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>>> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
>>>  [event14:base-stat]
>>>  fd=14
>>>  group_fd=11
>>>  type=4
>>> -config=33536
>>> +config=33280
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
>>> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
>>>  [event15:base-stat]
>>>  fd=15
>>>  group_fd=11
>>>  type=4
>>> -config=33024
>>> +config=33536
>>>  disabled=0
>>>  enable_on_exec=0
>>>  read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>>> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
>>>  [event16:base-stat]
>>>  fd=16
>>> +group_fd=11
>>>  type=4
>>> -config=4109
>>> +config=33792
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>>> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
>>>  [event17:base-stat]
>>>  fd=17
>>> +group_fd=11
>>>  type=4
>>> -config=17039629
>>> +config=34048
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>>> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
>>>  [event18:base-stat]
>>>  fd=18
>>> +group_fd=11
>>>  type=4
>>> -config=60
>>> +config=34304
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>>> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
>>>  [event19:base-stat]
>>>  fd=19
>>> +group_fd=11
>>>  type=4
>>> -config=2097421
>>> +config=34560
>>> +disabled=0
>>> +enable_on_exec=0
>>> +read_format=15
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>>> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
>>>  [event20:base-stat]
>>>  fd=20
>>>  type=4
>>> -config=316
>>> +config=4109
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
>>> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
>>>  [event21:base-stat]
>>>  fd=21
>>>  type=4
>>> -config=412
>>> +config=17039629
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
>>>  [event22:base-stat]
>>>  fd=22
>>>  type=4
>>> -config=572
>>> +config=60
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
>>> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
>>>  [event23:base-stat]
>>>  fd=23
>>>  type=4
>>> -config=706
>>> +config=2097421
>>>  optional=1
>>>  
>>> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
>>>  [event24:base-stat]
>>>  fd=24
>>>  type=4
>>> +config=316
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
>>> +[event25:base-stat]
>>> +fd=25
>>> +type=4
>>> +config=412
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
>>> +[event26:base-stat]
>>> +fd=26
>>> +type=4
>>> +config=572
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
>>> +[event27:base-stat]
>>> +fd=27
>>> +type=4
>>> +config=706
>>> +optional=1
>>> +
>>> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
>>> +[event28:base-stat]
>>> +fd=28
>>> +type=4
>>>  config=270
>>>  optional=1
>>>  
>>> @@ -190,8 +234,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event25:base-stat]
>>> -fd=25
>>> +[event29:base-stat]
>>> +fd=29
>>>  type=3
>>>  config=0
>>>  optional=1
>>> @@ -200,8 +244,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event26:base-stat]
>>> -fd=26
>>> +[event30:base-stat]
>>> +fd=30
>>>  type=3
>>>  config=65536
>>>  optional=1
>>> @@ -210,8 +254,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event27:base-stat]
>>> -fd=27
>>> +[event31:base-stat]
>>> +fd=31
>>>  type=3
>>>  config=2
>>>  optional=1
>>> @@ -220,8 +264,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event28:base-stat]
>>> -fd=28
>>> +[event32:base-stat]
>>> +fd=32
>>>  type=3
>>>  config=65538
>>>  optional=1
>>> @@ -230,8 +274,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event29:base-stat]
>>> -fd=29
>>> +[event33:base-stat]
>>> +fd=33
>>>  type=3
>>>  config=1
>>>  optional=1
>>> @@ -240,8 +284,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event30:base-stat]
>>> -fd=30
>>> +[event34:base-stat]
>>> +fd=34
>>>  type=3
>>>  config=65537
>>>  optional=1
>>> @@ -250,8 +294,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event31:base-stat]
>>> -fd=31
>>> +[event35:base-stat]
>>> +fd=35
>>>  type=3
>>>  config=3
>>>  optional=1
>>> @@ -260,8 +304,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event32:base-stat]
>>> -fd=32
>>> +[event36:base-stat]
>>> +fd=36
>>>  type=3
>>>  config=65539
>>>  optional=1
>>> @@ -270,8 +314,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event33:base-stat]
>>> -fd=33
>>> +[event37:base-stat]
>>> +fd=37
>>>  type=3
>>>  config=4
>>>  optional=1
>>> @@ -280,8 +324,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event34:base-stat]
>>> -fd=34
>>> +[event38:base-stat]
>>> +fd=38
>>>  type=3
>>>  config=65540
>>>  optional=1
>>> @@ -290,8 +334,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
>>> -[event35:base-stat]
>>> -fd=35
>>> +[event39:base-stat]
>>> +fd=39
>>>  type=3
>>>  config=512
>>>  optional=1
>>> @@ -300,8 +344,8 @@ optional=1
>>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
>>>  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
>>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
>>> -[event36:base-stat]
>>> -fd=36
>>> +[event40:base-stat]
>>> +fd=40
>>>  type=3
>>>  config=66048
>>>  optional=1
>>> -- 
>>> 2.43.0
>>>
>>>
>>
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf test attr: Add back missing topdown events
  2024-10-01  8:48     ` Veronika Molnarova
@ 2024-10-01 16:54       ` Ian Rogers
  0 siblings, 0 replies; 10+ messages in thread
From: Ian Rogers @ 2024-10-01 16:54 UTC (permalink / raw)
  To: Veronika Molnarova
  Cc: Arnaldo Carvalho de Melo, Michael Petlan, linux-perf-users, acme,
	Namhyung Kim, Kan Liang, Jiri Olsa, Adrian Hunter,
	Linux Kernel Mailing List

On Tue, Oct 1, 2024 at 1:48 AM Veronika Molnarova <vmolnaro@redhat.com> wrote:
>
>
>
> On 8/12/24 15:25, Arnaldo Carvalho de Melo wrote:
> > On Wed, Mar 20, 2024 at 01:16:48PM +0100, Michael Petlan wrote:
> >> Hello Ian,
> >> we've resent this patch, as the previous discussion about this
> >> was unfinished somehow, if I remember correctly. Is this fix
> >> acceptable?
> >> Thank you!
> >> Michael
> >
> > Ian,
> >
> >       I think this fell thru the cracks, do you have something to add?
> >
> > - Arnaldo
> >
> Hi Ian,
>
> do you have anything to add to this patch so that the issue
> could be resolved?
>
> Thanks,
> Veronika

Sorry for the delay. I always find these tests tricky to run so I'm
going to send a follow up series to resolve that.

Tested-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> >> On Mon, 11 Mar 2024, vmolnaro@redhat.com wrote:
> >>> From: Veronika Molnarova <vmolnaro@redhat.com>
> >>>
> >>> With the patch 0b6c5371c03c "Add missing topdown metrics events" eight
> >>> topdown metric events with numbers ranging from 0x8000 to 0x8700 were
> >>> added to the test since they were added as 'perf stat' default events.
> >>> Later the patch 951efb9976ce "Update no event/metric expectations" kept
> >>> only 4 of those events(0x8000-0x8300).
> >>>
> >>> Currently, the topdown events with numbers 0x8400 to 0x8700 are missing
> >>> from the list of expected events resulting in a failure. Add back the
> >>> missing topdown events.
> >>>
> >>> Fixes: 951efb9976ce ("perf test attr: Update no event/metric expectations")
> >>> Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
> >>> ---
> >>>  tools/perf/tests/attr/test-stat-default    |  90 ++++++++++----
> >>>  tools/perf/tests/attr/test-stat-detailed-1 | 106 +++++++++++-----
> >>>  tools/perf/tests/attr/test-stat-detailed-2 | 130 ++++++++++++-------
> >>>  tools/perf/tests/attr/test-stat-detailed-3 | 138 ++++++++++++++-------
> >>>  4 files changed, 320 insertions(+), 144 deletions(-)
> >>>
> >>> diff --git a/tools/perf/tests/attr/test-stat-default b/tools/perf/tests/attr/test-stat-default
> >>> index a1e2da0a9a6d..e47fb4944679 100644
> >>> --- a/tools/perf/tests/attr/test-stat-default
> >>> +++ b/tools/perf/tests/attr/test-stat-default
> >>> @@ -88,98 +88,142 @@ enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >>> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >>>  [event13:base-stat]
> >>>  fd=13
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33280
> >>> +config=33024
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >>> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >>>  [event14:base-stat]
> >>>  fd=14
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33536
> >>> +config=33280
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >>> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >>>  [event15:base-stat]
> >>>  fd=15
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33024
> >>> +config=33536
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >>> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> >>>  [event16:base-stat]
> >>>  fd=16
> >>> +group_fd=11
> >>>  type=4
> >>> -config=4109
> >>> +config=33792
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >>> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >>>  [event17:base-stat]
> >>>  fd=17
> >>> +group_fd=11
> >>>  type=4
> >>> -config=17039629
> >>> +config=34048
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >>> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >>>  [event18:base-stat]
> >>>  fd=18
> >>> +group_fd=11
> >>>  type=4
> >>> -config=60
> >>> +config=34304
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >>> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >>>  [event19:base-stat]
> >>>  fd=19
> >>> +group_fd=11
> >>>  type=4
> >>> -config=2097421
> >>> +config=34560
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >>> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >>>  [event20:base-stat]
> >>>  fd=20
> >>>  type=4
> >>> -config=316
> >>> +config=4109
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> >>> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >>>  [event21:base-stat]
> >>>  fd=21
> >>>  type=4
> >>> -config=412
> >>> +config=17039629
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >>>  [event22:base-stat]
> >>>  fd=22
> >>>  type=4
> >>> -config=572
> >>> +config=60
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> >>> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >>>  [event23:base-stat]
> >>>  fd=23
> >>>  type=4
> >>> -config=706
> >>> +config=2097421
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >>>  [event24:base-stat]
> >>>  fd=24
> >>>  type=4
> >>> +config=316
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> >>> +[event25:base-stat]
> >>> +fd=25
> >>> +type=4
> >>> +config=412
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> >>> +[event26:base-stat]
> >>> +fd=26
> >>> +type=4
> >>> +config=572
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> >>> +[event27:base-stat]
> >>> +fd=27
> >>> +type=4
> >>> +config=706
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> >>> +[event28:base-stat]
> >>> +fd=28
> >>> +type=4
> >>>  config=270
> >>>  optional=1
> >>> diff --git a/tools/perf/tests/attr/test-stat-detailed-1 b/tools/perf/tests/attr/test-stat-detailed-1
> >>> index 1c52cb05c900..3d500d3e0c5c 100644
> >>> --- a/tools/perf/tests/attr/test-stat-detailed-1
> >>> +++ b/tools/perf/tests/attr/test-stat-detailed-1
> >>> @@ -90,99 +90,143 @@ enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >>> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >>>  [event13:base-stat]
> >>>  fd=13
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33280
> >>> +config=33024
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >>> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >>>  [event14:base-stat]
> >>>  fd=14
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33536
> >>> +config=33280
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >>> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >>>  [event15:base-stat]
> >>>  fd=15
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33024
> >>> +config=33536
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >>> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> >>>  [event16:base-stat]
> >>>  fd=16
> >>> +group_fd=11
> >>>  type=4
> >>> -config=4109
> >>> +config=33792
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >>> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >>>  [event17:base-stat]
> >>>  fd=17
> >>> +group_fd=11
> >>>  type=4
> >>> -config=17039629
> >>> +config=34048
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >>> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >>>  [event18:base-stat]
> >>>  fd=18
> >>> +group_fd=11
> >>>  type=4
> >>> -config=60
> >>> +config=34304
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >>> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >>>  [event19:base-stat]
> >>>  fd=19
> >>> +group_fd=11
> >>>  type=4
> >>> -config=2097421
> >>> +config=34560
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >>> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >>>  [event20:base-stat]
> >>>  fd=20
> >>>  type=4
> >>> -config=316
> >>> +config=4109
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> >>> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >>>  [event21:base-stat]
> >>>  fd=21
> >>>  type=4
> >>> -config=412
> >>> +config=17039629
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >>>  [event22:base-stat]
> >>>  fd=22
> >>>  type=4
> >>> -config=572
> >>> +config=60
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> >>> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >>>  [event23:base-stat]
> >>>  fd=23
> >>>  type=4
> >>> -config=706
> >>> +config=2097421
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >>>  [event24:base-stat]
> >>>  fd=24
> >>>  type=4
> >>> +config=316
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> >>> +[event25:base-stat]
> >>> +fd=25
> >>> +type=4
> >>> +config=412
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> >>> +[event26:base-stat]
> >>> +fd=26
> >>> +type=4
> >>> +config=572
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> >>> +[event27:base-stat]
> >>> +fd=27
> >>> +type=4
> >>> +config=706
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> >>> +[event28:base-stat]
> >>> +fd=28
> >>> +type=4
> >>>  config=270
> >>>  optional=1
> >>>
> >>> @@ -190,8 +234,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event25:base-stat]
> >>> -fd=25
> >>> +[event29:base-stat]
> >>> +fd=29
> >>>  type=3
> >>>  config=0
> >>>  optional=1
> >>> @@ -200,8 +244,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event26:base-stat]
> >>> -fd=26
> >>> +[event30:base-stat]
> >>> +fd=30
> >>>  type=3
> >>>  config=65536
> >>>  optional=1
> >>> @@ -210,8 +254,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event27:base-stat]
> >>> -fd=27
> >>> +[event31:base-stat]
> >>> +fd=31
> >>>  type=3
> >>>  config=2
> >>>  optional=1
> >>> @@ -220,8 +264,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event28:base-stat]
> >>> -fd=28
> >>> +[event32:base-stat]
> >>> +fd=32
> >>>  type=3
> >>>  config=65538
> >>>  optional=1
> >>> diff --git a/tools/perf/tests/attr/test-stat-detailed-2 b/tools/perf/tests/attr/test-stat-detailed-2
> >>> index 7e961d24a885..01777a63752f 100644
> >>> --- a/tools/perf/tests/attr/test-stat-detailed-2
> >>> +++ b/tools/perf/tests/attr/test-stat-detailed-2
> >>> @@ -90,99 +90,143 @@ enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >>> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >>>  [event13:base-stat]
> >>>  fd=13
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33280
> >>> +config=33024
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >>> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >>>  [event14:base-stat]
> >>>  fd=14
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33536
> >>> +config=33280
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >>> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >>>  [event15:base-stat]
> >>>  fd=15
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33024
> >>> +config=33536
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >>> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> >>>  [event16:base-stat]
> >>>  fd=16
> >>> +group_fd=11
> >>>  type=4
> >>> -config=4109
> >>> +config=33792
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >>> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >>>  [event17:base-stat]
> >>>  fd=17
> >>> +group_fd=11
> >>>  type=4
> >>> -config=17039629
> >>> +config=34048
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >>> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >>>  [event18:base-stat]
> >>>  fd=18
> >>> +group_fd=11
> >>>  type=4
> >>> -config=60
> >>> +config=34304
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >>> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >>>  [event19:base-stat]
> >>>  fd=19
> >>> +group_fd=11
> >>>  type=4
> >>> -config=2097421
> >>> +config=34560
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >>> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >>>  [event20:base-stat]
> >>>  fd=20
> >>>  type=4
> >>> -config=316
> >>> +config=4109
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> >>> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >>>  [event21:base-stat]
> >>>  fd=21
> >>>  type=4
> >>> -config=412
> >>> +config=17039629
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >>>  [event22:base-stat]
> >>>  fd=22
> >>>  type=4
> >>> -config=572
> >>> +config=60
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> >>> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >>>  [event23:base-stat]
> >>>  fd=23
> >>>  type=4
> >>> -config=706
> >>> +config=2097421
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >>>  [event24:base-stat]
> >>>  fd=24
> >>>  type=4
> >>> +config=316
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> >>> +[event25:base-stat]
> >>> +fd=25
> >>> +type=4
> >>> +config=412
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> >>> +[event26:base-stat]
> >>> +fd=26
> >>> +type=4
> >>> +config=572
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> >>> +[event27:base-stat]
> >>> +fd=27
> >>> +type=4
> >>> +config=706
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> >>> +[event28:base-stat]
> >>> +fd=28
> >>> +type=4
> >>>  config=270
> >>>  optional=1
> >>>
> >>> @@ -190,8 +234,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event25:base-stat]
> >>> -fd=25
> >>> +[event29:base-stat]
> >>> +fd=29
> >>>  type=3
> >>>  config=0
> >>>  optional=1
> >>> @@ -200,8 +244,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event26:base-stat]
> >>> -fd=26
> >>> +[event30:base-stat]
> >>> +fd=30
> >>>  type=3
> >>>  config=65536
> >>>  optional=1
> >>> @@ -210,8 +254,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event27:base-stat]
> >>> -fd=27
> >>> +[event31:base-stat]
> >>> +fd=31
> >>>  type=3
> >>>  config=2
> >>>  optional=1
> >>> @@ -220,8 +264,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event28:base-stat]
> >>> -fd=28
> >>> +[event32:base-stat]
> >>> +fd=32
> >>>  type=3
> >>>  config=65538
> >>>  optional=1
> >>> @@ -230,8 +274,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event29:base-stat]
> >>> -fd=29
> >>> +[event33:base-stat]
> >>> +fd=33
> >>>  type=3
> >>>  config=1
> >>>  optional=1
> >>> @@ -240,8 +284,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event30:base-stat]
> >>> -fd=30
> >>> +[event34:base-stat]
> >>> +fd=34
> >>>  type=3
> >>>  config=65537
> >>>  optional=1
> >>> @@ -250,8 +294,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event31:base-stat]
> >>> -fd=31
> >>> +[event35:base-stat]
> >>> +fd=35
> >>>  type=3
> >>>  config=3
> >>>  optional=1
> >>> @@ -260,8 +304,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event32:base-stat]
> >>> -fd=32
> >>> +[event36:base-stat]
> >>> +fd=36
> >>>  type=3
> >>>  config=65539
> >>>  optional=1
> >>> @@ -270,8 +314,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event33:base-stat]
> >>> -fd=33
> >>> +[event37:base-stat]
> >>> +fd=37
> >>>  type=3
> >>>  config=4
> >>>  optional=1
> >>> @@ -280,8 +324,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event34:base-stat]
> >>> -fd=34
> >>> +[event38:base-stat]
> >>> +fd=38
> >>>  type=3
> >>>  config=65540
> >>>  optional=1
> >>> diff --git a/tools/perf/tests/attr/test-stat-detailed-3 b/tools/perf/tests/attr/test-stat-detailed-3
> >>> index e50535f45977..8400abd7e1e4 100644
> >>> --- a/tools/perf/tests/attr/test-stat-detailed-3
> >>> +++ b/tools/perf/tests/attr/test-stat-detailed-3
> >>> @@ -90,99 +90,143 @@ enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >>> +# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >>>  [event13:base-stat]
> >>>  fd=13
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33280
> >>> +config=33024
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >>> +# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
> >>>  [event14:base-stat]
> >>>  fd=14
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33536
> >>> +config=33280
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
> >>> +# PERF_TYPE_RAW / topdown-be-bound (0x8300)
> >>>  [event15:base-stat]
> >>>  fd=15
> >>>  group_fd=11
> >>>  type=4
> >>> -config=33024
> >>> +config=33536
> >>>  disabled=0
> >>>  enable_on_exec=0
> >>>  read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >>> +# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
> >>>  [event16:base-stat]
> >>>  fd=16
> >>> +group_fd=11
> >>>  type=4
> >>> -config=4109
> >>> +config=33792
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >>> +# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
> >>>  [event17:base-stat]
> >>>  fd=17
> >>> +group_fd=11
> >>>  type=4
> >>> -config=17039629
> >>> +config=34048
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >>> +# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
> >>>  [event18:base-stat]
> >>>  fd=18
> >>> +group_fd=11
> >>>  type=4
> >>> -config=60
> >>> +config=34304
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >>> +# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
> >>>  [event19:base-stat]
> >>>  fd=19
> >>> +group_fd=11
> >>>  type=4
> >>> -config=2097421
> >>> +config=34560
> >>> +disabled=0
> >>> +enable_on_exec=0
> >>> +read_format=15
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >>> +# PERF_TYPE_RAW / INT_MISC.UOP_DROPPING
> >>>  [event20:base-stat]
> >>>  fd=20
> >>>  type=4
> >>> -config=316
> >>> +config=4109
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> >>> +# PERF_TYPE_RAW / cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/
> >>>  [event21:base-stat]
> >>>  fd=21
> >>>  type=4
> >>> -config=412
> >>> +config=17039629
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.THREAD
> >>>  [event22:base-stat]
> >>>  fd=22
> >>>  type=4
> >>> -config=572
> >>> +config=60
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> >>> +# PERF_TYPE_RAW / INT_MISC.RECOVERY_CYCLES_ANY
> >>>  [event23:base-stat]
> >>>  fd=23
> >>>  type=4
> >>> -config=706
> >>> +config=2097421
> >>>  optional=1
> >>>
> >>> -# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.REF_XCLK
> >>>  [event24:base-stat]
> >>>  fd=24
> >>>  type=4
> >>> +config=316
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / IDQ_UOPS_NOT_DELIVERED.CORE
> >>> +[event25:base-stat]
> >>> +fd=25
> >>> +type=4
> >>> +config=412
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE
> >>> +[event26:base-stat]
> >>> +fd=26
> >>> +type=4
> >>> +config=572
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / UOPS_RETIRED.RETIRE_SLOTS
> >>> +[event27:base-stat]
> >>> +fd=27
> >>> +type=4
> >>> +config=706
> >>> +optional=1
> >>> +
> >>> +# PERF_TYPE_RAW / UOPS_ISSUED.ANY
> >>> +[event28:base-stat]
> >>> +fd=28
> >>> +type=4
> >>>  config=270
> >>>  optional=1
> >>>
> >>> @@ -190,8 +234,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event25:base-stat]
> >>> -fd=25
> >>> +[event29:base-stat]
> >>> +fd=29
> >>>  type=3
> >>>  config=0
> >>>  optional=1
> >>> @@ -200,8 +244,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event26:base-stat]
> >>> -fd=26
> >>> +[event30:base-stat]
> >>> +fd=30
> >>>  type=3
> >>>  config=65536
> >>>  optional=1
> >>> @@ -210,8 +254,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event27:base-stat]
> >>> -fd=27
> >>> +[event31:base-stat]
> >>> +fd=31
> >>>  type=3
> >>>  config=2
> >>>  optional=1
> >>> @@ -220,8 +264,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_LL                 <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event28:base-stat]
> >>> -fd=28
> >>> +[event32:base-stat]
> >>> +fd=32
> >>>  type=3
> >>>  config=65538
> >>>  optional=1
> >>> @@ -230,8 +274,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event29:base-stat]
> >>> -fd=29
> >>> +[event33:base-stat]
> >>> +fd=33
> >>>  type=3
> >>>  config=1
> >>>  optional=1
> >>> @@ -240,8 +284,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1I                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event30:base-stat]
> >>> -fd=30
> >>> +[event34:base-stat]
> >>> +fd=34
> >>>  type=3
> >>>  config=65537
> >>>  optional=1
> >>> @@ -250,8 +294,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event31:base-stat]
> >>> -fd=31
> >>> +[event35:base-stat]
> >>> +fd=35
> >>>  type=3
> >>>  config=3
> >>>  optional=1
> >>> @@ -260,8 +304,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_DTLB               <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event32:base-stat]
> >>> -fd=32
> >>> +[event36:base-stat]
> >>> +fd=36
> >>>  type=3
> >>>  config=65539
> >>>  optional=1
> >>> @@ -270,8 +314,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event33:base-stat]
> >>> -fd=33
> >>> +[event37:base-stat]
> >>> +fd=37
> >>>  type=3
> >>>  config=4
> >>>  optional=1
> >>> @@ -280,8 +324,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_ITLB               <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_READ            <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event34:base-stat]
> >>> -fd=34
> >>> +[event38:base-stat]
> >>> +fd=38
> >>>  type=3
> >>>  config=65540
> >>>  optional=1
> >>> @@ -290,8 +334,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_ACCESS      << 16)
> >>> -[event35:base-stat]
> >>> -fd=35
> >>> +[event39:base-stat]
> >>> +fd=39
> >>>  type=3
> >>>  config=512
> >>>  optional=1
> >>> @@ -300,8 +344,8 @@ optional=1
> >>>  #  PERF_COUNT_HW_CACHE_L1D                <<  0  |
> >>>  # (PERF_COUNT_HW_CACHE_OP_PREFETCH        <<  8) |
> >>>  # (PERF_COUNT_HW_CACHE_RESULT_MISS        << 16)
> >>> -[event36:base-stat]
> >>> -fd=36
> >>> +[event40:base-stat]
> >>> +fd=40
> >>>  type=3
> >>>  config=66048
> >>>  optional=1
> >>> --
> >>> 2.43.0
> >>>
> >>>
> >>
> >
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf test attr: Add back missing topdown events
  2024-03-11  8:16 vmolnaro
  2024-03-20 12:16 ` Michael Petlan
@ 2024-10-04 19:29 ` Namhyung Kim
  1 sibling, 0 replies; 10+ messages in thread
From: Namhyung Kim @ 2024-10-04 19:29 UTC (permalink / raw)
  To: linux-perf-users, acme, acme, vmolnaro; +Cc: mpetlan, irogers

On Mon, 11 Mar 2024 09:16:11 +0100, vmolnaro@redhat.com wrote:

> With the patch 0b6c5371c03c "Add missing topdown metrics events" eight
> topdown metric events with numbers ranging from 0x8000 to 0x8700 were
> added to the test since they were added as 'perf stat' default events.
> Later the patch 951efb9976ce "Update no event/metric expectations" kept
> only 4 of those events(0x8000-0x8300).
> 
> Currently, the topdown events with numbers 0x8400 to 0x8700 are missing
> from the list of expected events resulting in a failure. Add back the
> missing topdown events.
> 
> [...]

Applied to perf-tools-next, thanks!

Best regards,
Namhyung


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-10-04 19:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-22 21:38 [PATCH] perf test attr: Add back missing topdown events vmolnaro
2024-01-22 22:01 ` Ian Rogers
2024-01-26 15:14   ` Michael Petlan
2024-02-08 16:19     ` Michael Petlan
  -- strict thread matches above, loose matches on Subject: below --
2024-03-11  8:16 vmolnaro
2024-03-20 12:16 ` Michael Petlan
2024-08-12 13:25   ` Arnaldo Carvalho de Melo
2024-10-01  8:48     ` Veronika Molnarova
2024-10-01 16:54       ` Ian Rogers
2024-10-04 19:29 ` Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).