Skip to content

perf/x86: Rework msr probe interface

Jiri Olsa lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 1 replyIn review
  2. v28 patches 4 repliesSuperseded
  3. v18 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- rebase on latest perf changes for Icelake models

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8perf/x86: Add msr probe interfacearch/x86/events/Makefile arch/x86/events/probe.c arch/x86/events/probe.h+75 -10 replies
2/8perf/x86/msr: Use new probe functionarch/x86/events/msr.c+60 -500 replies
3/8perf/x86/cstate: Use new probe functionarch/x86/events/intel/cstate.c+87 -650 replies
4/8perf/x86/rapl: Use new msr detection interfacearch/x86/events/intel/rapl.c+191 -10 replies
5/8perf/x86/rapl: Get rapl_cntr_mask from new probe frameworkarch/x86/events/intel/rapl.c+2 -360 replies
6/8perf/x86/rapl: Get msr values from new probe frameworkarch/x86/events/intel/rapl.c+11 -421 reply
7/8perf/x86/rapl: Get attributes from new probe frameworkarch/x86/events/intel/rapl.c+0 -890 replies
8/8perf/x86/rapl: Get quirk state from new probe frameworkarch/x86/events/intel/rapl.c+3 -790 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCHv3 0/8] perf/x86: Rework msr probe interface

hi,
following up on [1], [2] and [3], this patchset adds update attribute groups to pmu, factors out the MSR probe code and use it in msr,cstate* and rapl PMUs.

The functionality stays the same with one exception:
for msr PMU: the event is not exported if the rdmsr return zero on event's msr, cstate* and rapl pmu functionality stays.

And also: ;-)

Quoted 2 lines

Somewhere along the line you lost the explanation of _why_ we're doing this; namely: virt sucks.

Also available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/msr

Tested on snb and skylake servers.

v3 changes:
- rebase on latest perf changes for Icelake models

v2 changes:
- checking zero rdmsr only for rapl PMU events, cstate* and msr pmu functionality stays unchanged

thanks,
jirka

[1] https://lore.kernel.org/lkml/20190301114250.GA23459@krava/
[2] https://lore.kernel.org/lkml/[email protected]/
[3] https://lore.kernel.org/lkml/[email protected]/
---
Jiri Olsa (8):
perf/x86: Add msr probe interface
perf/x86/msr: Use new probe function
perf/x86/cstate: Use new probe function
perf/x86/rapl: Use new msr detection interface perf/x86/rapl: Get rapl_cntr_mask from new probe framework perf/x86/rapl: Get msr values from new probe framework perf/x86/rapl: Get attributes from new probe framework perf/x86/rapl: Get quirk state from new probe framework

 arch/x86/events/Makefile       |   2 +-
 arch/x86/events/intel/cstate.c | 152 +++++++++++++++++++++++++++---------------------
 arch/x86/events/intel/rapl.c   | 380 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------
 arch/x86/events/msr.c          | 110 +++++++++++++++++++----------------
 arch/x86/events/probe.c        |  45 +++++++++++++++
 arch/x86/events/probe.h        |  29 ++++++++++
 6 files changed, 392 insertions(+), 326 deletions(-)
 create mode 100644 arch/x86/events/probe.c
 create mode 100644 arch/x86/events/probe.h