aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorHe Kuang <hekuang@huawei.com>2016-06-02 23:33:20 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-06-07 14:11:46 -0400
commiteeb118c5d77878948e09308afe4fd9d0efe68ef7 (patch)
treedf9c418e770a49a94f9840180661d88bfed0c63f /tools/perf
parentd64ec10ec8b43a519f132e7c33c1815a4e86949e (diff)
perf unwind: Change fixed name of libunwind__arch_reg_id to macro
For local libunwind, it uses the fixed methods to convert register id according to the host platform, but in remote libunwind, this convert function should be the one for remote architecture. This patch changes the fixed name to macro and code for each remote platform can be compiled indivadually. 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-12-git-send-email-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/unwind-libunwind-local.c2
-rw-r--r--tools/perf/util/unwind.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index 9c70486c5c6a..631b40d94643 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -508,7 +508,7 @@ static int access_reg(unw_addr_space_t __maybe_unused as,
508 return 0; 508 return 0;
509 } 509 }
510 510
511 id = libunwind__arch_reg_id(regnum); 511 id = LIBUNWIND__ARCH_REG_ID(regnum);
512 if (id < 0) 512 if (id < 0)
513 return -EINVAL; 513 return -EINVAL;
514 514
diff --git a/tools/perf/util/unwind.h b/tools/perf/util/unwind.h
index bf9f5937caee..b07466240346 100644
--- a/tools/perf/util/unwind.h
+++ b/tools/perf/util/unwind.h
@@ -29,7 +29,10 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
29 struct perf_sample *data, int max_stack); 29 struct perf_sample *data, int max_stack);
30/* libunwind specific */ 30/* libunwind specific */
31#ifdef HAVE_LIBUNWIND_SUPPORT 31#ifdef HAVE_LIBUNWIND_SUPPORT
32int libunwind__arch_reg_id(int regnum); 32#ifndef LIBUNWIND__ARCH_REG_ID
33#define LIBUNWIND__ARCH_REG_ID(regnum) libunwind__arch_reg_id(regnum)
34#endif
35int LIBUNWIND__ARCH_REG_ID(int regnum);
33int unwind__prepare_access(struct thread *thread, struct map *map); 36int unwind__prepare_access(struct thread *thread, struct map *map);
34void unwind__flush_access(struct thread *thread); 37void unwind__flush_access(struct thread *thread);
35void unwind__finish_access(struct thread *thread); 38void unwind__finish_access(struct thread *thread);