remarkable-linux/tools
David Ahern d327fa4359 perf tools: handle endianness of feature bitmap
Feature bitmap is declared as an array of unsigned longs -- not good
since its size can differ between the host that generated the data file
and the host analyzing the file.

We need to handle endianness, but we don't know the size of the unsigned
long where the file was generated. Take a best guess at determining it:
try 64-bit swap first (ie., file created on a 64-bit host), and check if
the hostname feature bit is set (this feature bit is forced on as of
fbe96f2).  If the bit is not, undo the 64-bit swap and try a 32-bit
swap. If the hostname bit is still not set (e.g., older data file), punt
and fallback to the original behavior -- clearing all feature bits and
setting buildid.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1318980841-12616-1-git-send-email-dsahern@gmail.com
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2011-10-19 13:14:35 -02:00
..
firewire
perf perf tools: handle endianness of feature bitmap 2011-10-19 13:14:35 -02:00
power cpupower: use man(1) when calling "cpupower help subcommand" 2011-08-19 17:13:56 +02:00
slub slub: slabinfo update for cmpxchg handling 2011-07-02 13:26:57 +03:00
testing/ktest ktest: Fix bug when ADD_CONFIG is set but MIN_CONFIG is not 2011-07-15 22:05:59 -04:00
usb
virtio virtio_test: support event index 2011-05-30 11:14:15 +09:30