All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@elte.hu, ak@linux.intel.com,
	acme@redhat.com, jolsa@redhat.com,
	Stephane Eranian <eranian@gmail.com>
Subject: [PATCH 0/2] perf: enforce exclusive PMU access for SNB INST_RETIRED:PREC_DIST
Date: Fri, 19 Oct 2012 16:52:04 +0200	[thread overview]
Message-ID: <1350658326-14715-1-git-send-email-eranian@google.com> (raw)

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

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


             reply	other threads:[~2012-10-19 14:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19 14:52 Stephane Eranian [this message]
2012-10-19 14:52 ` [PATCH 1/2] perf tools: add event modifier to request exclusive PMU access Stephane Eranian
2012-10-19 15:13   ` Peter Zijlstra
2012-10-19 15:17     ` Stephane Eranian
2012-10-19 15:23       ` Jiri Olsa
2012-10-19 15:47         ` Stephane Eranian
2012-10-19 15:53           ` Jiri Olsa
2012-10-19 15:58             ` Stephane Eranian
2012-10-19 15:46       ` Andi Kleen
2012-10-19 16:07         ` Jiri Olsa
2012-10-19 14:52 ` [PATCH 2/2] perf: SNB exclusive PMU access for INST_RETIRED:PREC_DIST Stephane Eranian
2012-10-19 15:49   ` Andi Kleen
2012-10-19 15:58     ` Stephane Eranian
2012-10-19 16:27   ` Peter Zijlstra
2012-10-19 16:31     ` Stephane Eranian
2012-10-19 16:45       ` Peter Zijlstra
2012-10-19 17:20         ` Andi Kleen
2012-10-21 16:55           ` Ingo Molnar
2012-10-21 17:54             ` Stephane Eranian
2012-10-21 18:03               ` Ingo Molnar
2012-10-22 11:31                 ` Stephane Eranian
2012-10-24  8:15                   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1350658326-14715-1-git-send-email-eranian@google.com \
    --to=eranian@google.com \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.