Re: [PATCH] perf tools: Fix swap for samples with raw data

2017-12-13 Thread Jiri Olsa
On Wed, Dec 13, 2017 at 09:33:58AM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Nov 29, 2017 at 07:43:46PM +0100, Jiri Olsa escreveu: > > The fix is basically to swap back the raw data if different > > endianity is detected. > > > +++ b/tools/perf/util/evsel.c > > @@ -36,6 +36,7 @@ > > #incl

Re: [PATCH] perf tools: Fix swap for samples with raw data

2017-12-13 Thread Arnaldo Carvalho de Melo
Em Wed, Nov 29, 2017 at 07:43:46PM +0100, Jiri Olsa escreveu: > The fix is basically to swap back the raw data if different > endianity is detected. > +++ b/tools/perf/util/evsel.c > @@ -36,6 +36,7 @@ > #include "trace-event.h" > #include "stat.h" > +#include "memswap.h" > @@ -2131,14 +2132,27

Re: [PATCH] perf tools: Fix swap for samples with raw data

2017-12-11 Thread Arnaldo Carvalho de Melo
Em Wed, Nov 29, 2017 at 07:43:46PM +0100, Jiri Olsa escreveu: > When we detect different endianity we swap event before > processing. It's tricky for samples because we have no > idea what's inside. We treat it as an array of u64s, > swap them and later on we swap back parts which are > different.

Re: [PATCH] perf tools: Fix swap for samples with raw data

2017-11-29 Thread Steven Rostedt
On Wed, 29 Nov 2017 19:43:46 +0100 Jiri Olsa wrote: > Luckily the traceevent library handles the endianity by > itself (thank you Steven!), so we can pass the RAW data > directly in the other endianity. You are welcome ;-) -- Steve

[PATCH] perf tools: Fix swap for samples with raw data

2017-11-29 Thread Jiri Olsa
When we detect different endianity we swap event before processing. It's tricky for samples because we have no idea what's inside. We treat it as an array of u64s, swap them and later on we swap back parts which are different. We mangle this way also the tracepoint raw data, which ends up in repor