All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Andi Kleen <andi@firstfloor.org>,
	LKML <linux-kernel@vger.kernel.org>,
	stable@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 2/2] perf, x86: Don't allow unusual PEBS raw flags
Date: Tue, 7 May 2013 08:48:05 +0200	[thread overview]
Message-ID: <20130507064804.GE17705@gmail.com> (raw)
In-Reply-To: <CABPqkBREmUfuPBvCvBF+4YNvzfuqgDffVvfUFE5_w6Yx88mBZQ@mail.gmail.com>


* Stephane Eranian <eranian@google.com> wrote:

> On Mon, May 6, 2013 at 8:52 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Mon, May 06, 2013 at 07:44:19PM +0200, Stephane Eranian wrote:
> >> On Thu, May 2, 2013 at 9:37 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> >> > On Wed, Apr 24, 2013 at 04:04:54PM -0700, Andi Kleen wrote:
> >> >> From: Andi Kleen <ak@linux.intel.com>
> >> >>
> >> >> The PEBS documentation in the Intel SDM 18.6.1.1 states:
> >> >>
> >> >> """
> >> >> PEBS events are only valid when the following fields of IA32_PERFEVTSELx are all
> >> >> zero: AnyThread, Edge, Invert, CMask.
> >> >> """
> >> >>
> >> >> Since we had problems with this earlier, don't allow cmask, any, edge, invert
> >> >> as raw events, except for the ones explicitly listed as pebs_aliases.
> >> >
> >> > If its a simple matter of crap in crap out without affecting anything else we
> >> > shouldn't do anything.
> >> >
> >> The problem here is that you are sampling an instruction which did not cause
> >> the event you are measuring. Remember that using cmask, changes the
> >> nature of what's being measured (from event to cycles).
> >
> > Yeah.. I don't see the problem though. If you're using cmask and the like
> > you're supposed to know wth you're doing; which includes knowing your cpu and
> > what it thinks of such an event.
>
> But that implies that you'd know that on Intel precise mode uses PEBS 
> and that PEBS does not take cmask events. That seems to contradict the 
> philosophy of perf_events where the kernel does the work for you.

Also, this code only runs when the event is set up, so a bit of sanity 
checking can only help, right?

Thanks,

	Ingo

  reply	other threads:[~2013-05-07  6:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24 23:04 [PATCH 1/2] Fix perf LBR filtering Andi Kleen
2013-04-24 23:04 ` [PATCH 2/2] perf, x86: Don't allow unusual PEBS raw flags Andi Kleen
2013-04-29 22:16   ` Stephane Eranian
2013-04-29 22:34     ` Andi Kleen
2013-04-29 23:05       ` Stephane Eranian
2013-05-02  7:37   ` Peter Zijlstra
2013-05-06 17:44     ` Stephane Eranian
2013-05-06 18:52       ` Peter Zijlstra
2013-05-06 22:43         ` Stephane Eranian
2013-05-07  6:48           ` Ingo Molnar [this message]
2013-05-07  8:48             ` Peter Zijlstra
2013-05-07 11:04               ` Ingo Molnar
2013-05-07  8:43           ` Peter Zijlstra
2013-04-24 23:20 ` [PATCH 1/2] Fix perf LBR filtering Ben Hutchings
2013-04-24 23:24 ` Greg KH
2013-04-25 16:25 ` Peter Zijlstra
2013-04-25 16:41   ` Andi Kleen
2013-04-25 16:48     ` Peter Zijlstra
2013-04-25 17:00       ` Andi Kleen
2013-04-25 17:18         ` Peter Zijlstra
2013-04-25 17:42           ` Andi Kleen
2013-04-26  7:56             ` Peter Zijlstra
2013-04-26 19:46               ` Andi Kleen
2013-05-01 11:51                 ` Ingo Molnar
2013-05-01 11:55                   ` 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=20130507064804.GE17705@gmail.com \
    --to=mingo@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.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.