Re: [PATCH 1/3] perf events: fix WARN_ON_ONCE for 64-bit raw data,SW events

From: Arnaldo Carvalho de Melo
Date: Fri Feb 18 2011 - 09:54:02 EST


Em Fri, Feb 18, 2011 at 07:33:28AM -0700, David Ahern escreveu:
> On 02/18/11 04:00, Peter Zijlstra wrote:
> > On Thu, 2011-02-17 at 22:53 -0700, David Ahern wrote:
> >> This check does not work out for 64-bit counter:
> >>
> >> sizeof(u32) + sizeof(u64) = 4 + 8 = 12
> >>
> >> which does not pass the WARN_ON_ONCE test. I'm guessing (hoping
> >> really) that the intent is that the size of the raw data is a
> >> multiple of 4 bytes, not 8.
> >
> > No the data must come in 8bytes strides.
> >
>
> Then the sizeof the size field needs to be moved to u64; right now it is
> u32:
>
> struct perf_raw_record {
> u32 size;
> void *data;
> };
>
> So size should be changed to u64 rather than modifying the WARN_ON_ONCE?

Yeah, I guess so, 32-bit has to die it seems, gets in the way of testing
:-)

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/