lkml.org 
[lkml]   [2009]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/2] perf tools: Use DECLARE_BITMAP instead of an open-coded array

* Frederic Weisbecker <fweisbec@gmail.com> wrote:

> On Sat, Oct 17, 2009 at 05:57:18PM +0200, Frederic Weisbecker wrote:
> > Use DECLARE_BITMAP instead of an open coded array for our bitmap
> > of featured sections.
> >
> > This makes the array an unsigned long instead of a u64 but since we
> > use a 256 bits bitmap, the array size shouldn't vary between
> > different boxes.
>
> That said I would really feel more comfortable if someone can confirm
> that.

Should be size-invariant for the bitmap size of 256 bits due to:

#define DECLARE_BITMAP(name,bits) \
unsigned long name[BITS_TO_LONGS(bits)]

but it's not little-endian/big-endian invariant.

We should at minimum save the CPU architecture (and endianness
parameters) the data got generated on, and reject
endianness-incompatible uses - so that if someone wants to add
cross-endian support it can be implemented cleanly.

Ingo


\
 
 \ /
  Last update: 2009-10-19 09:33    [W:0.087 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site