Re: [RFC PATCH 06/12] perf: Support extension of sample_regs

From: Liang, Kan
Date: Wed Jun 18 2025 - 09:53:15 EST




On 2025-06-18 9:30 a.m., Peter Zijlstra wrote:
> On Wed, Jun 18, 2025 at 06:10:20AM -0400, Liang, Kan wrote:
>
>> Maybe we should use a mask to replace the nr_vectors.
>> Because Dave mentioned that the XSAVES may fail.
>
> XSAVE is a pain in the arse :/
>
>> PERF_SAMPLE_SIMD_REGS := {
>> u64 vectors_mask;
>> u16 vector_length;
>> u64 pred_mask;
>> u16 pred_length;
>
> That is not u64 aligned...

I didn't know we have the alignment requirement for the output.
If so,

PERF_SAMPLE_SIMD_REGS := {
u64 vectors_mask;
u64 pred_mask;
u64 vector_length:16,
pred_length:16,
reserved:32;
u64 data[];
}

Thanks,
Kan>
>> u64 data[];
>> }