perf: Fix uncore metric issue
Status from this message: The following commit has been merged into the perf/core branch of tip:
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | perf util: Change convert_scale from static to globaltools/ tools/ | +5 | 0 replies | |
| 2/4 | perf vendor events intel: Update cascadelakex uncore events to v1.04tools/ tools/ | +1971 | 2 replies | |
| 3/4 | perf util: Scale the metric resulttools/ tools/ tools/ | +31 | 0 replies | |
| 4/4 | perf util: Support multiple events for metricgrouptools/ tools/ tools/ | +68 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH v1 0/4] perf: Fix uncore metric issue
Some uncore metrics don't work as expected. For example, on cascadelakex,
root@lkp-csl-2sp2:~# perf stat -M UNC_M_PMM_BANDWIDTH.TOTAL -a -- sleep 1
Performance counter stats for 'system wide':
1841092 unc_m_pmm_rpq_inserts
3680816 unc_m_pmm_wpq_inserts
1.001775055 seconds time elapsedroot@lkp-csl-2sp2:~# perf stat -M UNC_M_PMM_READ_LATENCY -a -- sleep 1
Performance counter stats for 'system wide':
860649746 unc_m_pmm_rpq_occupancy.all
1840557 unc_m_pmm_rpq_inserts
12790627455 unc_m_clockticks1.001773348 seconds time elapsed
No metrics 'UNC_M_PMM_BANDWIDTH.TOTAL' or 'UNC_M_PMM_READ_LATENCY' are reported.
The issue is, the case of an alias expanding to mulitple events is not supported, typically the uncore events.
(see comments in find_evsel_group()). For detail, please check the description in patch 'perf util: Support multiple events for metricgroup'.
With this patch set,
root@lkp-csl-2sp2:~# perf stat -M UNC_M_PMM_BANDWIDTH.TOTAL -a -- sleep 1
Performance counter stats for 'system wide':
1842108 unc_m_pmm_rpq_inserts # 337.2 MB/sec UNC_M_PMM_BANDWIDTH.TOTAL
3682209 unc_m_pmm_wpq_inserts
1.001819706 seconds time elapsedroot@lkp-csl-2sp2:~# perf stat -M UNC_M_PMM_READ_LATENCY -a -- sleep 1
Performance counter stats for 'system wide':
861970685 unc_m_pmm_rpq_occupancy.all # 219.4 ns UNC_M_PMM_READ_LATENCY
1842772 unc_m_pmm_rpq_inserts
12790196356 unc_m_clockticks1.001749103 seconds time elapsed
Now we can see the correct metrics 'UNC_M_PMM_BANDWIDTH.TOTAL' and 'UNC_M_PMM_READ_LATENCY'.
Haiyan Song (1):
perf vendor events intel: Update cascadelakex uncore events to v1.04
Jin Yao (3):
perf util: Change convert_scale from static to global perf util: Scale the metric result
perf util: Support multiple events for metricgroup
.../arch/x86/cascadelakex/uncore-memory.json | 191 ++ .../arch/x86/cascadelakex/uncore-other.json | 1809 ++++++++++++++++- tools/perf/util/evsel.h | 1 + tools/perf/util/metricgroup.c | 87 +- tools/perf/util/metricgroup.h | 1 + tools/perf/util/pmu.c | 6 +- tools/perf/util/pmu.h | 2 + tools/perf/util/stat-shadow.c | 65 +- 8 files changed, 2075 insertions(+), 87 deletions(-)
Signature · 1 line
2.17.1