Re: perfmon2 code review: 32-bit ABI on 64-bit OS

Stephane Eranian
2006-02-13T20:34:03Z

Bryan,

On Fri, Feb 10, 2006 at 10:27:02AM -0800, Bryan O'Sullivan wrote:
>
> On some 64-bit arches (e.g. x86_64), most userspace code is 64-bit,
> while on others (e.g. powerpc), most is 32-bit. Reducing the number of
> things that a userspace tool or library writer can trip over seems like
> a good thing here, even if it slightly complicates perfmon's internals.
>
> > Note that there are similar issues with the remapped sampling buffer.
> > There, you need to explicitly compile your tool with a special option
> > to force certain types to be 64-bit (size_t, void *).
>
> It's pretty normal to just use 64-bit quantities in these cases, and
> cast appropriately.
>

So if I understand you correctly, you are saying it is best to have bitmasks
hardcoded to u64 and have the kernel cast to match the bitmap_*() interface.
This would not cause any alignment problems on neither 32-bit nor 64-bit system.

--

-Stephane