Re: [PATCH] perf: make perf.data more self-descriptive (v4)

From: Stephane Eranian
Date: Fri Sep 16 2011 - 10:57:13 EST


On Fri, Sep 16, 2011 at 4:52 PM, David Ahern <dsahern@xxxxxxxxx> wrote:
>
> On 09/16/2011 08:44 AM, Stephane Eranian wrote:
>>> Sure, but all you need to know is if the file you're reading is a
>>> different endian than your box, if it is swap stuff, if its not, you're
>>> good.
>>
>> We agree on that. I am just saying the MAGIC string as it is today
>> may not be enough to tell us that.
>
> Right. I think that's why the attribute struct is used to detect
> endianness and not the magic.
>
Yes, but using attr_size was the wrong choice. I suspect we may be
able to use size (sizeof(f_header)) if we know:
- it is not going to change.
- require perfect match with sizeof(struct perf_file_header)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/