public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>,
	Stephane Eranian <eranian@google.com>,
	"Metzger, Markus T" <markus.t.metzger@intel.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Robert Richter <robert.richter@amd.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jamie Iles <jamie.iles@picochip.com>,
	Paul Mundt <lethal@linux-sh.org>,
	Arjan van de Ven <arjan@infradead.org>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [RFC][PATCH] perf_events, x86: PEBS support
Date: Tue, 2 Feb 2010 19:26:53 +0100	[thread overview]
Message-ID: <20100202182653.GB19320@elte.hu> (raw)
In-Reply-To: <1265129772.24455.329.camel@laptop>


* Peter Zijlstra <peterz@infradead.org> wrote:

> Totally uncompiled and untested, but it looks to be about mostly there so I 
> thought I'd post it.
> 
> One of the things that is missing is keeping the count value sane while 
> using PEBS -- another is dealing with auto frequency things, I thought 
> about single shot PEBS assist for that.
> 
> After this we can do something like PERF_SAMPLE_REGS, but for that we need 
> to think about how to expose pt_regs to userspace or something (or maybe it 
> already is, I haven't checked).
> 
> Also, initially I'll go through all the other hw perf implementations 
> (powerpc, sparc, arm, sh) and make then refuse to create attr.precise 
> counters -- precise meaning the reported IP is not influenced by OoO 
> artefacts.
> 
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
>  arch/x86/kernel/cpu/perf_event.c |  354 ++++++++++++++++++++++++++++++++++-----
>  include/linux/perf_event.h       |    4 
>  2 files changed, 314 insertions(+), 44 deletions(-)

Very nice!

> @@ -203,8 +203,9 @@ struct perf_event_attr {
>  				enable_on_exec :  1, /* next exec enables     */
>  				task           :  1, /* trace fork/exit       */
>  				watermark      :  1, /* wakeup_watermark      */
> +				precise        :  1,

I think we want to default to precise events even if not specifically 
requested by user-space, in the cases where that's possible on the CPU 
without additional limitations.

That way people will default to better (and possibly cheaper) PEBS profiling 
on modern Intel CPUs.

	Ingo

  reply	other threads:[~2010-02-02 18:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 16:56 [RFC][PATCH] perf_events, x86: PEBS support Peter Zijlstra
2010-02-02 18:26 ` Ingo Molnar [this message]
2010-02-02 18:33   ` Peter Zijlstra
2010-02-03 13:22     ` Stephane Eranian
2010-02-03 13:56       ` Peter Zijlstra
2010-02-03 14:07         ` Stephane Eranian
2010-02-03 14:19           ` Peter Zijlstra
2010-02-03 14:30             ` Stephane Eranian
2010-02-03 14:40               ` Peter Zijlstra
2010-02-03 14:54                 ` Stephane Eranian
2010-02-03 15:12                   ` Peter Zijlstra
2010-02-03 23:50                 ` Peter Zijlstra
2010-02-03 23:51                   ` Stephane Eranian
2010-02-04  0:03                     ` Peter Zijlstra
2010-02-04  0:22                       ` Stephane Eranian

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=20100202182653.GB19320@elte.hu \
    --to=mingo@elte.hu \
    --cc=arjan@infradead.org \
    --cc=davem@davemloft.net \
    --cc=eranian@google.com \
    --cc=hpa@zytor.com \
    --cc=jamie.iles@picochip.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.t.metzger@intel.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=robert.richter@amd.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox