Re: [PATCH v2] perf tools: fix endian conversion reading event attrfrom file header

From: Frederic Weisbecker
Date: Sun Jul 17 2011 - 14:12:23 EST


On Fri, Jul 15, 2011 at 12:34:09PM -0600, David Ahern wrote:
> The perf_event_attr struct has 2 __u32's at the top and 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.
>
> v1 -> 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@xxxxxxxxx>

Thanks!

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