Re: [PATCH 5/7] powerpc/perf: Define big-endian version ofperf_mem_data_src
From: Vince Weaver
Date: Sun Aug 11 2013 - 23:18:54 EST
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
--
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/