Re: [RFC PATCH 00/12] Support vector and more extended registers in perf
From: Liang, Kan
Date: Wed Jun 18 2025 - 09:15:41 EST
On 2025-06-18 8:28 a.m., Mi, Dapeng wrote:
>>>>> Not sure, it eats up a whole byte. Dapeng seemed to favour separate
>>>>> intr/user vector width (although I'm not quite sure what the use would
>>>>> be).
>>> The reason that I prefer to add 2 separate "words" item is that user could
>>> sample interrupt and user space SIMD regs (but with different bit-width)
>>> simultaneously in theory, like "--intr-regs=YMM0, --user-regs=XMM0".
>> I'm not sure why the user wants a different bit-width. The
>> --user-regs=XMM0" doesn't seem to provide more useful information.
>>
>> Anyway, I believe the tool can handle this case. The tool can always ask
>> YMM0 for both --intr-regs and --user-regs, but only output the XMM0 for
>> --user-regs. The only drawback is that the kernel may dump extra
>> information for the --user-regs. I don't think it's a big problem.
> If we intent to handle it in user space tools, I'm not sure if user space
> tool can easily know which records are from user space and filter out the
> SIMD regs from kernel space and how complicated would the change be. IMO,
> adding an extra u16 "words" would be much easier and won't consume too much
> memory.
The filter is always done in kernel for --user-regs. The only difference
is that the YMM (after filter) will be dumped to the perf.data. The tool
just show the XMM registers to the end user.
Thanks,
Kan