[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130528095425.GB6764@gmail.com>
Date: Tue, 28 May 2013 11:54:25 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Stephane Eranian <eranian@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Jiri Olsa <jolsa@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Namhyung Kim <namhyung@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Andi Kleen <ak@...ux.intel.com>,
David Ahern <dsahern@...il.com>
Subject: Re: [PATCH 0/9] perf: Adding better precise_ip field handling
* Stephane Eranian <eranian@...gle.com> wrote:
> On Mon, May 13, 2013 at 9:43 PM, Ingo Molnar <mingo@...nel.org> wrote:
> >
> > * Peter Zijlstra <peterz@...radead.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.
> >
> >> 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.
> >
> > The vast majority of code gets measured by cycles:pp more accurately than
> > cycles.
> >
> I don't understand how you come to that conclusion. [...]
By frequently looking at cycles:pp output.
> [...] I can show you simple examples where this is not true at all (even
> without rep mov).
That would be useful if there's any practical problem with cycles:pp. In
terms of profiling typical kernel and user space functions it does appear
to work very well.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists