Skip to content

Commit 982b6ac

Browse files
captain5050acmel
authored andcommitted
perf vendor events intel: Alderlake/rocketlake metric fixes
Fix that the core PMU is being specified for 2 uncore events. Specify a PMU for the alderlake UNCORE_FREQ metric. Conversion script updated in: intel/perfmon#126 Committer testing: Before this patch the "perf all metricgroups test" was failing, now: root@number:~# perf test metric 10: PMU events : 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 10.5: Parsing of metric thresholds with fake PMUs : Ok 61: Parse and process metrics : Ok 98: perf stat metrics (shadow stat) test : Skip 101: perf all metricgroups test : Ok 102: perf all metrics test : FAILED! 107: perf metrics value validation : Ok root@number:~# Test 102 is failing for another reason, not being able to get as many counters as needed, Ian Rogers suggested disabling the NMI watchdog to have more counters available: root@number:/home/acme# cat /proc/sys/kernel/nmi_watchdog 1 root@number:/home/acme# echo 0 > /proc/sys/kernel/nmi_watchdog root@number:/home/acme# perf test 102 102: perf all metrics test : Ok root@number:/home/acme# Closes: https://lore.kernel.org/lkml/[email protected]/ Reported-by: Arnaldo Carvalho de Melo <[email protected]> Reviewed-by: Kan Liang <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Edward Baker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent ec5257d commit 982b6ac

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

tools/perf/pmu-events/arch/x86/alderlake/adl-metrics.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,6 @@
6969
"MetricName": "C9_Pkg_Residency",
7070
"ScaleUnit": "100%"
7171
},
72-
{
73-
"BriefDescription": "Uncore frequency per die [GHZ]",
74-
"MetricExpr": "tma_info_system_socket_clks / #num_dies / duration_time / 1e9",
75-
"MetricGroup": "SoC",
76-
"MetricName": "UNCORE_FREQ"
77-
},
7872
{
7973
"BriefDescription": "Percentage of cycles spent in System Management Interrupts.",
8074
"MetricExpr": "((msr@aperf@ - cycles) / msr@aperf@ if msr@smi@ > 0 else 0)",
@@ -809,6 +803,13 @@
809803
"ScaleUnit": "100%",
810804
"Unit": "cpu_atom"
811805
},
806+
{
807+
"BriefDescription": "Uncore frequency per die [GHZ]",
808+
"MetricExpr": "tma_info_system_socket_clks / #num_dies / duration_time / 1e9",
809+
"MetricGroup": "SoC",
810+
"MetricName": "UNCORE_FREQ",
811+
"Unit": "cpu_core"
812+
},
812813
{
813814
"BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution ports for ALU operations.",
814815
"MetricExpr": "(cpu_core@UOPS_DISPATCHED.PORT_0@ + cpu_core@UOPS_DISPATCHED.PORT_1@ + cpu_core@UOPS_DISPATCHED.PORT_5_11@ + cpu_core@UOPS_DISPATCHED.PORT_6@) / (5 * tma_info_core_core_clks)",
@@ -1838,7 +1839,7 @@
18381839
},
18391840
{
18401841
"BriefDescription": "Average number of parallel data read requests to external memory",
1841-
"MetricExpr": "UNC_ARB_DAT_OCCUPANCY.RD / cpu_core@UNC_ARB_DAT_OCCUPANCY.RD\\,cmask\\=1@",
1842+
"MetricExpr": "UNC_ARB_DAT_OCCUPANCY.RD / UNC_ARB_DAT_OCCUPANCY.RD@cmask\\=1@",
18421843
"MetricGroup": "Mem;MemoryBW;SoC",
18431844
"MetricName": "tma_info_system_mem_parallel_reads",
18441845
"PublicDescription": "Average number of parallel data read requests to external memory. Accounts for demand loads and L1/L2 prefetches",

tools/perf/pmu-events/arch/x86/rocketlake/rkl-metrics.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@
985985
},
986986
{
987987
"BriefDescription": "Average number of parallel data read requests to external memory",
988-
"MetricExpr": "UNC_ARB_DAT_OCCUPANCY.RD / cpu@UNC_ARB_DAT_OCCUPANCY.RD\\,cmask\\=1@",
988+
"MetricExpr": "UNC_ARB_DAT_OCCUPANCY.RD / UNC_ARB_DAT_OCCUPANCY.RD@cmask\\=1@",
989989
"MetricGroup": "Mem;MemoryBW;SoC",
990990
"MetricName": "tma_info_system_mem_parallel_reads",
991991
"PublicDescription": "Average number of parallel data read requests to external memory. Accounts for demand loads and L1/L2 prefetches"

0 commit comments

Comments
 (0)