perf tools: Fix cross-endian analysis
authorDavid Ahern <david.ahern@oracle.com>
Thu, 9 Apr 2015 20:15:46 +0000 (16:15 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 10 Apr 2015 13:13:58 +0000 (10:13 -0300)
commit1060ab857f64f33a9445881fd31fa91470aeb622
treeb92fb150dade3a0dcd8f13f309dc8a972ae985ca
parentd998b732599b304c3865e8e5c7ba6250faba6589
perf tools: Fix cross-endian analysis

Trying to analyze a big endian data file on little endian system fails
with the error:

  0xa9b40 [0x70]: failed to process type: 9

The problem is that header parsing is not done correctly because the
file attributes are not swapped. Make it so. With this patch able to
analyze a sparc64 data file on x86_64.

Signed-off-by: David Ahern <david.ahern@oracle.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1428610546-178789-1-git-send-email-david.ahern@oracle.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c