[perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Stephane Eranian
There is a warn_on_once() check for PERF_SAMPLE_RAW which trips when using PEBS on both Core and Nehalem. Core PEBS sample size is 144 bytes and 176 bytes for Nehalem. Both are multiples of 8, but the size field is encoded as int, thus the total is never a multiple o

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Peter Zijlstra
On Thu, 2010-04-08 at 22:45 +0200, Stephane Eranian wrote: > There is a warn_on_once() check for PERF_SAMPLE_RAW which trips > when using PEBS on both Core and Nehalem. Core PEBS sample size is 144 > bytes and 176 bytes for Nehalem. Both are multiples of 8, but the size > fi

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Peter Zijlstra
On Thu, 2010-04-08 at 22:55 +0200, Peter Zijlstra wrote: > On Thu, 2010-04-08 at 22:45 +0200, Stephane Eranian wrote: > > There is a warn_on_once() check for PERF_SAMPLE_RAW which trips > > when using PEBS on both Core and Nehalem. Core PEBS sample size is 144 > > bytes and 176 bytes fo

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Stephane Eranian
On Thu, Apr 8, 2010 at 10:55 PM, Peter Zijlstra wrote: > On Thu, 2010-04-08 at 22:45 +0200, Stephane Eranian wrote: >>       There is a warn_on_once() check for PERF_SAMPLE_RAW which trips >>       when using PEBS on both Core and Nehalem. Core PEBS sample size is 144 >>       bytes and 176 bytes

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Peter Zijlstra
On Thu, 2010-04-08 at 23:08 +0200, Stephane Eranian wrote: > > Are you suggesting you add some padding the PEBS raw sample you > return as PERF_SAMPLE_RAW? Then you need to define what RAW > actually means? Seems here, it would mean more than what the > HW returns. Well, RAW doesn't mean anythin

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Peter Zijlstra
On Thu, 2010-04-08 at 23:08 +0200, Stephane Eranian wrote: > > > There's various things that do indeed rely on the perf buffer to always > > be u64 aligned, so this warning isn't bogus at all. > > > I assume this has to do with the wrap-around detection. Nah, mostly dealing with architectures tha

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Stephane Eranian
On Thu, Apr 8, 2010 at 11:11 PM, Peter Zijlstra wrote: > On Thu, 2010-04-08 at 23:08 +0200, Stephane Eranian wrote: >> >> Are you suggesting you add some padding the PEBS raw sample you >> return as PERF_SAMPLE_RAW? Then you need to define what RAW >> actually means? Seems here, it would mean more

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Peter Zijlstra
On Thu, 2010-04-08 at 23:08 +0200, Stephane Eranian wrote: > On Thu, Apr 8, 2010 at 10:55 PM, Peter Zijlstra wrote: > > On Thu, 2010-04-08 at 22:45 +0200, Stephane Eranian wrote: > >> There is a warn_on_once() check for PERF_SAMPLE_RAW which trips > >> when using PEBS on both Core and

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Frederic Weisbecker
On Thu, Apr 08, 2010 at 11:14:15PM +0200, Stephane Eranian wrote: > On Thu, Apr 8, 2010 at 11:11 PM, Peter Zijlstra wrote: > > On Thu, 2010-04-08 at 23:08 +0200, Stephane Eranian wrote: > >> > >> Are you suggesting you add some padding the PEBS raw sample you > >> return as PERF_SAMPLE_RAW? Then y

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Stephane Eranian
On Thu, Apr 8, 2010 at 11:03 PM, Peter Zijlstra wrote: > On Thu, 2010-04-08 at 22:55 +0200, Peter Zijlstra wrote: >> On Thu, 2010-04-08 at 22:45 +0200, Stephane Eranian wrote: >> >     There is a warn_on_once() check for PERF_SAMPLE_RAW which trips >> >     when using PEBS on both Core and Nehalem

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Stephane Eranian
On Thu, Apr 8, 2010 at 11:17 PM, Frederic Weisbecker wrote: > On Thu, Apr 08, 2010 at 11:14:15PM +0200, Stephane Eranian wrote: >> On Thu, Apr 8, 2010 at 11:11 PM, Peter Zijlstra wrote: >> > On Thu, 2010-04-08 at 23:08 +0200, Stephane Eranian wrote: >> >> >> >> Are you suggesting you add some pad

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Peter Zijlstra
On Thu, 2010-04-08 at 23:14 +0200, Stephane Eranian wrote: > On Thu, Apr 8, 2010 at 11:11 PM, Peter Zijlstra wrote: > > On Thu, 2010-04-08 at 23:08 +0200, Stephane Eranian wrote: > >> > >> Are you suggesting you add some padding the PEBS raw sample you > >> return as PERF_SAMPLE_RAW? Then you need

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Peter Zijlstra
On Thu, 2010-04-08 at 23:18 +0200, Stephane Eranian wrote: > I am not sure I understand what you mean by buffered PEBS. Are you talking > about using PEBS buffer bigger than one entry? Yep. > If so, how can you do: > - the LBR based fixups for multiple samples (on PMU interrupt) Not, so it wou

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Stephane Eranian
On Thu, Apr 8, 2010 at 11:15 PM, Peter Zijlstra wrote: > On Thu, 2010-04-08 at 23:08 +0200, Stephane Eranian wrote: >> On Thu, Apr 8, 2010 at 10:55 PM, Peter Zijlstra wrote: >> > On Thu, 2010-04-08 at 22:45 +0200, Stephane Eranian wrote: >> >>       There is a warn_on_once() check for PERF_SAMPLE

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Stephane Eranian
On Thu, Apr 8, 2010 at 11:24 PM, Peter Zijlstra wrote: > On Thu, 2010-04-08 at 23:18 +0200, Stephane Eranian wrote: >> I am not sure I understand what you mean by buffered PEBS. Are you talking >> about using PEBS buffer bigger than one entry? > > Yep. > >> If so, how can you do: >>   - the LBR ba

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Frederic Weisbecker
On Thu, Apr 08, 2010 at 11:22:05PM +0200, Stephane Eranian wrote: > On Thu, Apr 8, 2010 at 11:17 PM, Frederic Weisbecker > wrote: > > On Thu, Apr 08, 2010 at 11:14:15PM +0200, Stephane Eranian wrote: > >> On Thu, Apr 8, 2010 at 11:11 PM, Peter Zijlstra > >> wrote: > >> > On Thu, 2010-04-08 at 2

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Peter Zijlstra
On Thu, 2010-04-08 at 23:29 +0200, Stephane Eranian wrote: > On Thu, Apr 8, 2010 at 11:15 PM, Peter Zijlstra wrote: > > On Thu, 2010-04-08 at 23:08 +0200, Stephane Eranian wrote: > >> On Thu, Apr 8, 2010 at 10:55 PM, Peter Zijlstra > >> wrote: > >> > On Thu, 2010-04-08 at 22:45 +0200, Stephane E

Re: [perfmon2] [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()

2010-04-08 Thread Frederic Weisbecker
On Thu, Apr 08, 2010 at 11:22:05PM +0200, Stephane Eranian wrote: > On Thu, Apr 8, 2010 at 11:17 PM, Frederic Weisbecker > wrote: > > On Thu, Apr 08, 2010 at 11:14:15PM +0200, Stephane Eranian wrote: > >> On Thu, Apr 8, 2010 at 11:11 PM, Peter Zijlstra > >> wrote: > >> > On Thu, 2010-04-08 at 2