[PATCH 5/7] powerpc/perf: Define big-endian version of perf_mem_data_src
Vince Weaver
vince at deater.net
Mon Aug 12 13:19:52 EST 2013
On Mon, 12 Aug 2013, Michael Ellerman wrote:
>
> Yes I think so. The interface is already defined and it's little endian,
> so on big endian we just need to swap.
>
> The only part I'm not clear on is how things are handled in perf
> userspace, it seems to already do some byte swapping.
It would be nice to clarify this.
"struct perf_branch_entry" also has bitfields like this, though to make
things more confusing that structure isn't exported via the uapi header
so it's not clear how userspace code is supposed to interpret the values.
As you say it gets complicated with perf userspace, especially in cases
where you record the data on big-endian but then try to analyze the
results on a little-endian machine.
It would be nice to get confirmation that these bitfields will always be
little-endian. I guess they currently are by definition because only
x86/pebs sets data.data_src.val so far?
Vince
More information about the Linuxppc-dev
mailing list