Re: [PATCH v4 02/19] perf/uapi: Factor perf_build_id out into its own top-level struct

From: Ian Rogers

Date: Mon Nov 30 2026 - 14:34:33 EST


On Wed, Nov 25, 2026 at 02:17:55PM +0100, Peter Zijlstra wrote:
> On Tue, Nov 24, 2026 at 04:50:51PM -0800, Ian Rogers wrote:
> > * u16 __reserved_2;
> > * u8 build_id[20];
> > * };
> > + * struct perf_build_id bid;
>
> Why not remove the anonymous version?

Good point -- we kept the anonymous fields in libperf's C struct
perf_record_mmap2 (in tools/lib/perf/include/perf/event.h) for
source-level compatibility with existing callers accessing
build_id_size/build_id[], and mirrored that here. Since
include/uapi/linux/perf_event.h is only a doc comment, removing the
anonymous version here is much cleaner. I'll drop it from the UAPI
comment in v5.

Thanks,
Ian