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 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 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>


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
Please read the FAQ at