Thread (21 messages) 21 messages, 5 authors, 2017-03-16

Re: [PATCH v2 1/6] powerpc/perf: Define big-endian version of perf_mem_data_src

From: Peter Zijlstra <peterz@infradead.org>
Date: 2017-03-07 12:45:16
Also in: lkml

On Tue, Mar 07, 2017 at 03:28:17PM +0530, Madhavan Srinivasan wrote:

On Monday 06 March 2017 04:52 PM, Peter Zijlstra wrote:
quoted
On Mon, Mar 06, 2017 at 04:13:08PM +0530, Madhavan Srinivasan wrote:
quoted
From: Sukadev Bhattiprolu <redacted>

perf_mem_data_src is an union that is initialized via the ->val field
and accessed via the bitmap fields. For this to work on big endian
platforms, we also need a big-endian represenation of perf_mem_data_src.
Doesn't this break interpreting the data on a different endian machine?
IIUC, we will need this patch to not to break the interpreting data
on a different endian machine. Data collected from power8 LE/BE
guests with this patchset applied. Kindly correct me if I missed
your question here.
So your patch adds compile time bitfield differences. My worry was that
there was no dynamic conversion routine in the tools (it has for a lot
of other places).

This yields two questions:

 - are these two static layouts identical? (seeing that you illustrate
   cross-endian things working this seems likely).

 - should you not have fixed this in the tool only? This patch
   effectively breaks ABI on big-endian architectures.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help