mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>,
	linux-kernel@vger.kernel.org,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Namhyung Kim <namhyung@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Andi Kleen <ak@linux.intel.com>, David Ahern <dsahern@gmail.com>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 0/9] perf: Adding better precise_ip field handling
Date: Tue, 14 May 2013 09:22:39 +0200	[thread overview]
Message-ID: <20130514072239.GC15942@dyad.programming.kicks-ass.net> (raw)
In-Reply-To: <20130513194313.GA30998@gmail.com>

On Mon, May 13, 2013 at 09:43:13PM +0200, Ingo Molnar wrote:
> 
> * Peter Zijlstra <peterz@infradead.org> wrote:
> 
> > On Sat, May 11, 2013 at 09:50:08AM +0200, Ingo Molnar wrote:
> > > That's really a red herring: there's absolutely no reason why the 
> > > kernel could not pass back the level of precision it provided.
> > 
> > All I've been saying is that doing random precision without feedback is 
> > confusing.
> 
> I agree with that.
> 
> > We also don't really have a good feedback channel for this kind of 
> > thing. The best I can come up with is tagging each and every sample with 
> > the quality it represents. I think we can do with only one extra 
> > PERF_RECORD_MISC bit, but it looks like we're quickly running out of 
> > those things.
> 
> Hm, how about passing precision back to user-space at creation time, in 
> the perf_attr data structure? There's no need to pass it back in every 
> sample, precision will not really change during the life-time of an event.

Ah indeed, we talked about modifying the attr structure before (error details
or so). Did something like that ever make it in, or would this be the first
use now?

> > But I think the biggest problem is PEBS's inability do deal with REP 
> > prefixes; see this email from Stephane: 
> > https://lkml.org/lkml/2011/2/1/177
> >
> > It is really unfortunate for PEBS to have such a side-effect; but it 
> > makes all memset/memcpy/memmove things appear like they have no cost. 
> > I'm very sure that will surprise a number of people.
> 
> I'd expect PEBS to get gradually better.
> 
> Note that at least for user-space, REP MOVS is getting rarer. libc uses 
> SSE based memcpy/memset variants - which is not miscounted by PEBS. The 
> kernel still uses REP MOVS - but it's a special case because it cannot 
> cheaply use vector registers.

What's the rep_good cpu feature flag for? I thought Intel was putting more
effort into making REP MOVS doing the right thing again. No need to worry your
pretty head about the best way to move bytes around any longer.

> The vast majority of code gets measured by cycles:pp more accurately than 
> cycles.
> 
> We could try and see how many people complain. It's not like it's hard to 
> undo such a change of the default event?

I suppose so.. Alternatively we can have the PEBS event read a 'real' cycles
counter and weight the sample based on that. Bit cumbersome, esp if you want to
implement it kernel side, but it could possibly work around this issue.

  reply	other threads:[~2013-05-14  7:24 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-09 13:32 Jiri Olsa
2013-05-09 13:32 ` [PATCH 1/9] perf x86: Add precise sysfs cpu pmu attribute Jiri Olsa
2013-05-09 13:32 ` [PATCH 2/9] perf tools: Add precise object to interface sysfs precise Jiri Olsa
2013-05-10  1:34   ` Namhyung Kim
2013-05-10  9:06     ` Jiri Olsa
2013-05-09 13:32 ` [PATCH 3/9] perf tests: Add precise event automated test Jiri Olsa
2013-05-09 13:32 ` [PATCH 4/9] perf tools: Add a precise event qualifier Jiri Olsa
2013-05-10  1:43   ` Namhyung Kim
2013-05-10  9:10     ` Jiri Olsa
2013-05-09 13:32 ` [PATCH 5/9] perf tools: Set maximum precise value for event 'p' modifier Jiri Olsa
2013-05-09 19:43   ` David Ahern
2013-05-10  9:12     ` Jiri Olsa
2013-05-10  1:53   ` Namhyung Kim
2013-05-10  9:16     ` Jiri Olsa
2013-05-09 13:32 ` [PATCH 6/9] perf tools: Set maximum precise value for 'precise' term Jiri Olsa
2013-05-09 13:32 ` [PATCH 7/9] perf tests: Add automated precise term test Jiri Olsa
2013-05-09 13:32 ` [PATCH 8/9] perf: Document the ABI for 'precise' sysfs attribute Jiri Olsa
2013-05-10  1:57   ` Namhyung Kim
2013-05-09 13:32 ` [PATCH 9/9] perf: Document the ABI for 'rdpmc' " Jiri Olsa
2013-05-09 15:07 ` [PATCH 0/9] perf: Adding better precise_ip field handling Peter Zijlstra
2013-05-09 15:20   ` Jiri Olsa
2013-05-10  9:27     ` Peter Zijlstra
2013-05-10  9:40       ` Jiri Olsa
2013-05-10  9:53         ` Peter Zijlstra
2013-05-10 10:18           ` Ingo Molnar
2013-05-10 10:22             ` Peter Zijlstra
2013-05-10 10:31               ` Ingo Molnar
2013-05-10 10:34                 ` Peter Zijlstra
2013-05-10 10:55                   ` Ingo Molnar
2013-05-10 11:27                     ` Peter Zijlstra
2013-05-11  7:50                       ` Ingo Molnar
2013-05-13  9:36                         ` Peter Zijlstra
2013-05-13 19:43                           ` Ingo Molnar
2013-05-14  7:22                             ` Peter Zijlstra [this message]
2013-05-14  8:37                               ` Ingo Molnar
2013-05-14  8:36                             ` Gleb Natapov
2013-05-15 13:27                             ` Stephane Eranian
2013-05-28  9:54                               ` Ingo Molnar
2013-05-10  9:29     ` Peter Zijlstra
2013-05-10  9:43       ` Jiri Olsa
  -- strict thread matches above, loose matches on Subject: below --
2013-01-26 17:27 Jiri Olsa
2013-01-26 18:53 ` Jiri Olsa
2013-01-27 12:41 ` Ingo Molnar
2013-01-27 12:57   ` Jiri Olsa
2013-01-27 13:02     ` 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=20130514072239.GC15942@dyad.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome