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

Bryan O'Sullivan
2006-02-10T18:27:02Z

On Fri, 2006-02-10 at 07:36 -0800, Stephane Eranian wrote:

> Many 64-bit Linux kernel do support running 32-bit native applications.
> That is the case on PPC64, MIPS64K, X86-64, for instance.

And sparc64 and s390.

> One could well
> write a 32-bit monitoring tool on top of a 64-bit OS.

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.

<b