All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/4] perf: Fix uncore metric issue
@ 2019-08-28  5:59 Jin Yao
  2019-08-28  5:59 ` [PATCH v1 1/4] perf util: Change convert_scale from static to global Jin Yao
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jin Yao @ 2019-08-28  5:59 UTC (permalink / raw)
  To: acme, jolsa, peterz, mingo, alexander.shishkin
  Cc: Linux-kernel, ak, kan.liang, yao.jin, Jin Yao

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 elapsed

root@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_clockticks

       1.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 elapsed

root@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_clockticks

       1.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(-)

-- 
2.17.1


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

end of thread, other threads:[~2019-09-02  8:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28  5:59 [PATCH v1 0/4] perf: Fix uncore metric issue Jin Yao
2019-08-28  5:59 ` [PATCH v1 1/4] perf util: Change convert_scale from static to global Jin Yao
2019-09-02  8:16   ` [tip: perf/core] perf pmu: " tip-bot2 for Jin Yao
2019-08-28  5:59 ` [PATCH v1 2/4] perf vendor events intel: Update cascadelakex uncore events to v1.04 Jin Yao
2019-08-30 18:22   ` Arnaldo Carvalho de Melo
2019-08-30 22:18     ` Jin, Yao
2019-08-28  5:59 ` [PATCH v1 3/4] perf util: Scale the metric result Jin Yao
2019-09-02  8:16   ` [tip: perf/core] perf metricgroup: " tip-bot2 for Jin Yao
2019-08-28  5:59 ` [PATCH v1 4/4] perf util: Support multiple events for metricgroup Jin Yao
2019-09-02  8:16   ` [tip: perf/core] perf metricgroup: " tip-bot2 for Jin Yao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.