linux/tools
David Ahern 5dd830d09d perf tools: Fix endian conversion reading event attr from file header
commit eda3913bb7 upstream.

The perf_event_attr struct has two __u32's at the top and
they need to be swapped individually.

With this change I was able to analyze a perf.data collected in a
32-bit PPC VM on an x86 system. I tested both 32-bit and 64-bit
binaries for the Intel analysis side; both read the PPC perf.data
file correctly.

-v2:
 - changed the existing perf_event__attr_swap() to swap only elements
   of perf_event_attr and exported it for use in swapping the
   attributes in the file header
 - updated swap_ops used for processing events

Signed-off-by: David Ahern <dsahern@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: acme@ghostprotocols.net
Cc: peterz@infradead.org
Cc: paulus@samba.org
Link: http://lkml.kernel.org/r/1310754849-12474-1-git-send-email-dsahern@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-04 21:58:35 -07:00
..
firewire
perf perf tools: Fix endian conversion reading event attr from file header 2011-08-04 21:58:35 -07:00
power/x86 Merge branch 'master' into for-next 2011-04-26 10:22:59 +02:00
slub
testing/ktest ktest: Ignore unset values of the minconfig in config_bisect 2011-06-02 11:57:57 -04:00
usb
virtio virtio_test: support event index 2011-05-30 11:14:15 +09:30