[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171123100214.qm3s4h5b6i4r2iaa@hirez.programming.kicks-ass.net>
Date: Thu, 23 Nov 2017 11:02:14 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Song Liu <songliubraving@...com>
Cc: rostedt@...dmis.org, mingo@...hat.com, davem@...emloft.net,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
daniel@...earbox.net, kernel-team@...com
Subject: Re: [PATCH 1/6] perf: Add new type PERF_TYPE_PROBE
On Wed, Nov 15, 2017 at 09:23:33AM -0800, Song Liu wrote:
> Note: We use type __u64 for pointer probe_desc instead of __aligned_u64.
> The reason here is to avoid changing the size of struct perf_event_attr,
> and breaking new-kernel-old-utility scenario. To avoid alignment problem
> with the pointer, we will (in the following patches) copy probe_desc to
> __aligned_u64 before using it as pointer.
ISTR there are only relatively few architectures where __u64 and
__aligned_u64 are not the same thing.
The comment that goes with it seems to suggest i386 has short alignment
for u64 but my compiler says differently:
printf("%d, %d\n", sizeof(unsigned long long), __alignof__(unsigned long long));
$ gcc -m32 -o align align.c && ./align
8, 8
Powered by blists - more mailing lists