Re: [PATCH v4 03/19] perf/uapi: Add BUILD_ID_OFFSET sample types to UAPI

From: Peter Zijlstra

Date: Wed Nov 25 2026 - 08:25:37 EST


On Tue, Nov 24, 2026 at 04:50:52PM -0800, Ian Rogers wrote:
> Introduce PERF_SAMPLE_BUILD_ID_OFFSET and
> PERF_SAMPLE_CALLCHAIN_BUILD_ID_OFFSET in enum perf_event_sample_format.
>
> For PERF_SAMPLE_CALLCHAIN_BUILD_ID_OFFSET (and
> PERF_RECORD_CALLCHAIN_DEFERRED when PERF_RECORD_MISC_MMAP_BUILD_ID is
> set), encode a deduplicated table of variable-length build IDs
> (u32 nr_build_ids, u32 nr_offsets, followed by packed { u8 size;
> u8 data[size]; } entries padded to 8-byte alignment) and an array of
> 64-bit offsets whose top 8 bits encode the 1-based build ID index (or
> 0x00 for unresolved user addresses and 0xff for kernel/context entries).
> In common cases where multiple callchain frames belong to the same
> binary, each unique build ID is encoded only once.

Why ?!? This is insane