aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/python-ext-sources
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2017-11-29 19:43:46 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-12-27 12:15:56 -0300
commitf9d8adb345d7adbb2d3431eea73beb89c8d6d612 (patch)
tree24027fd9ea3db42e6378009b0250e8cbab78877b /tools/perf/util/python-ext-sources
parentperf probe: Support escaped character in parser (diff)
downloadlinux-dev-f9d8adb345d7adbb2d3431eea73beb89c8d6d612.tar.xz
linux-dev-f9d8adb345d7adbb2d3431eea73beb89c8d6d612.zip
perf evsel: Fix swap for samples with raw data
When we detect a 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 report showing wrong data: 1.95% comm=Q^B pid=29285 prio=16777216 target_cpu=000 1.67% comm=l^B pid=0 prio=16777216 target_cpu=000 Luckily the traceevent library handles the endianity by itself (thank you Steven!), so we can pass the RAW data directly in the other endianity. 2.51% comm=beah-rhts-task pid=1175 prio=120 target_cpu=002 2.23% comm=kworker/0:0 pid=11566 prio=120 target_cpu=000 The fix is basically to swap back the raw data if different endianity is detected. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/20171129184346.3656-1-jolsa@kernel.org [ Add util/memswap.c to python-ext-sources to link missing mem_bswap_64() ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/python-ext-sources')
-rw-r--r--tools/perf/util/python-ext-sources1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources
index b4f2f06722a7..7aa0ea64544e 100644
--- a/tools/perf/util/python-ext-sources
+++ b/tools/perf/util/python-ext-sources
@@ -10,6 +10,7 @@ util/ctype.c
util/evlist.c
util/evsel.c
util/cpumap.c
+util/memswap.c
util/mmap.c
util/namespaces.c
../lib/bitmap.c