summaryrefslogtreecommitdiff
path: root/tools/perf/util/thread.h
diff options
context:
space:
mode:
authorHe Kuang <hekuang@huawei.com>2016-06-03 06:33:12 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-06-07 18:08:52 +0300
commitf83c04156c1483f16ac548516f41212cf244e441 (patch)
tree4880d7dac992ee50993b68758e13ff373b81495e /tools/perf/util/thread.h
parentc1d1d0d9b302cb5f0365f4de78dd7fcbf7983c05 (diff)
downloadlinux-f83c04156c1483f16ac548516f41212cf244e441.tar.xz
perf unwind: Introduce 'struct unwind_libunwind_ops' for local unwind
Currently, libunwind operations are fixed, and they are chosen according to the host architecture. This will lead to a problem that if a thread is run as x86_32 on a x86_64 machine, perf will use libunwind methods for x86_64 to parse the callchain and get wrong results. This patch changes the fixed methods of libunwind operations to be thread/map related, and each thread can have individual libunwind operations. Local libunwind methods are registered as default value. Signed-off-by: He Kuang <hekuang@huawei.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/1464924803-22214-4-git-send-email-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/thread.h')
-rw-r--r--tools/perf/util/thread.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index 4c9f0aa11f1f..07ffb18221ab 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -11,6 +11,7 @@
#include <intlist.h>
struct thread_stack;
+struct unwind_libunwind_ops;
struct thread {
union {
@@ -33,7 +34,8 @@ struct thread {
void *priv;
struct thread_stack *ts;
#ifdef HAVE_LIBUNWIND_SUPPORT
- void *addr_space;
+ void *addr_space;
+ struct unwind_libunwind_ops *unwind_libunwind_ops;
#endif
};