The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 0/2] perf: enforce exclusive PMU access for SNB INST_RETIRED:PREC_DIST
@ 2012-10-22 13:20 Stephane Eranian
  2012-10-22 13:20 ` [PATCH v2 1/2] perf tools: add event modifier to request exclusive PMU access Stephane Eranian
  2012-10-22 13:20 ` [PATCH v2 2/2] perf: enforce SNB exclusive access for INST_RETIRED:PREC_DIST Stephane Eranian
  0 siblings, 2 replies; 10+ messages in thread
From: Stephane Eranian @ 2012-10-22 13:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, mingo, ak, acme, jolsa, Stephane Eranian

From: Stephane Eranian <eranian@gmail.com>

The following patch set enforces exclusive PMU access for
Intel SandyBridge INST_REITRED:PREC_DIST event when used
with PEBS as described in the SDM Vol 3b. Without this,
the sample distribution may not be correct.

The kernel now rejects PEBS + INST_RETIRED:PREC_DIST
on SNB if attr->exclusive is not set. One reason to
do it this way is to make sure users understands the
restriction. If the kernel were to force exclusive
on the fly, users would have cases where they would
get no samples and no error messages to understand
why.

The first patch extends perf to allow users to request
exclusive PMU access by introducing a new modifier: x.
For instance:
  $ perf record -e r01c0:ppx .....
or
  $ perf record -e cpu/event=0xc0,umask=0x1/ppx ....

In V2, we fixed the pr_info() issue. We know use
pr_warn_once(). Also fixed the max repeat factor
for the event modifier in the event parser.

Signed-off-by: Stephane Eranian <eranian@google.com>

Stephane Eranian (2):
  perf tools: add event modifier to request exclusive PMU access
  perf: enforce SNB exclusive access for INST_RETIRED:PREC_DIST

 arch/x86/kernel/cpu/perf_event.h       |    2 +-
 arch/x86/kernel/cpu/perf_event_intel.c |   30 +++++++++++++++++++++++++-----
 tools/perf/util/parse-events.c         |    7 +++++++
 tools/perf/util/parse-events.l         |    2 +-
 4 files changed, 34 insertions(+), 7 deletions(-)

-- 
1.7.9.5


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

end of thread, other threads:[~2012-10-22 17:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-22 13:20 [PATCH v2 0/2] perf: enforce exclusive PMU access for SNB INST_RETIRED:PREC_DIST Stephane Eranian
2012-10-22 13:20 ` [PATCH v2 1/2] perf tools: add event modifier to request exclusive PMU access Stephane Eranian
2012-10-22 13:53   ` Andi Kleen
2012-10-22 14:55     ` Stephane Eranian
2012-10-22 15:39       ` Andi Kleen
2012-10-22 15:44         ` Stephane Eranian
2012-10-22 15:59           ` Peter Zijlstra
2012-10-22 16:08             ` Stephane Eranian
2012-10-22 17:08               ` Peter Zijlstra
2012-10-22 13:20 ` [PATCH v2 2/2] perf: enforce SNB exclusive access for INST_RETIRED:PREC_DIST Stephane Eranian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox