perf callchain: Fix kernel symbol resolution by remembering the cpumode
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 30 Mar 2015 08:11:00 +0000 (10:11 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 31 Mar 2015 20:52:17 +0000 (17:52 -0300)
commit73dbcd6537f0ef6bf98d84f8fd7f8ab9994c6cd8
tree2cfafaa079fc8e5bbb5508f62733461665ef3602
parent6ab2b762befd192b90704c5c7898f5abf8ebb387
perf callchain: Fix kernel symbol resolution by remembering the cpumode

Commit 2e77784bb7d8 ("perf callchain: Move cpumode resolve code to
add_callchain_ip") promised "No change in behavior.".

As this commit breaks callchains on s390x (symbols not getting resolved,
observed when profiling the kernel), this statement is wrong. The cpumode
must be kept when iterating over all ips, otherwise the default
(PERF_RECORD_MISC_USER) will be used by error.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1427703060-59883-1-git-send-email-dahi@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/machine.c