diff options
author | David Ahern <dsahern@gmail.com> | 2011-10-18 17:34:01 -0600 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-10-19 13:14:35 -0200 |
commit | d327fa435996c3e559b55e254bad6ed801a92f89 (patch) | |
tree | 120b8e58623ba82d82fcc99bc8a2bd36b118b763 /net/rxrpc/ar-error.c | |
parent | e77b15bd849fc85b0228e95da9b7559aa6d31f40 (diff) | |
download | linux-d327fa435996c3e559b55e254bad6ed801a92f89.tar.bz2 |
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>
Diffstat (limited to 'net/rxrpc/ar-error.c')
0 files changed, 0 insertions, 0 deletions