lkml.org 
[lkml]   [2011]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] perf: make perf.data more self-descriptive (v4)
From
On Fri, Sep 16, 2011 at 4:37 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Fri, 2011-09-16 at 16:35 +0200, Stephane Eranian wrote:
>> On Mon, Sep 12, 2011 at 4:43 PM, Peter Zijlstra <peterz@infradead.org> wrote:
>> > On Mon, 2011-09-12 at 16:40 +0200, Stephane Eranian wrote:
>> >> I don't think this should be the test to detect endianess.
>> >
>> > You should be able to tell the endianness from the PERF_MAGIC string, it
>> > stores the string as a u64, so depending on endianness it reads back as
>> > either: PERFFILE or ELIFFREP or whatever the bswap64 result is.
>> >
>>
>> I believe in big endian, if you do od -c perf.data | head -1, you also see:
>>
>> 0000000   P   E   R   F   F   I   L   E   h  \0  \0  \0  \0  \0  \0  \0
>
> 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.

>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-09-16 16:47    [W:0.059 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site