Messages in this thread | | | Date | Tue, 2 Feb 2010 19:26:53 +0100 | From | Ingo Molnar <> | Subject | Re: [RFC][PATCH] perf_events, x86: PEBS support |
| |
* 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
| |