Hi Andy,

> On 19 Sep 2026, at 1:34 pm, Andi Kleen <[email protected]> wrote:
> 
> External email: Use caution opening links or attachments
> 
> 
>> +namespace perf_data {
>> +
>> +/* Scalar loaders for little-endian perf binary payloads.  afdo_tools
>> +   supports only little-endian hosts (enforced by configure) and
>> +   little-endian perf.data files.  memcpy into a native integer.  */
> 
> Well in this case you could just use the structs directly?

We can.  IMO we could keep the wrapper so that in the even we want to support 
BE which I dont think is needed. 
I will remove them.

> 
> The wrappers seem overkill.
> 
>> +/* Bit layout matches Linux `PERF_SAMPLE_*` 
>> (include/uapi/linux/perf_event.h).
>> +   perf.data attrs.sample_type uses these values.  */
> 
> Why not just use the standard linux include?
Do you suggest that we use the linux headers directly making it a dependency? 
Or do you want to copy headers or part of the headers directly?
I am not sure if we need to consider any licensing issues if we are copying the 
headers here.

> 
>> +
>> +#pragma pack(push, 1)
> 
> Is the pack only needed for the sizeof of the struct? Otherwise I don't
> think anybody supported does unnatural alignment.
> 

Removing.

Thanks,
Kugan

Reply via email to