From c9b951c4d12f0b2e9a07dd459c554bc05628d092 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Tue, 7 Jan 2014 13:47:29 +0100 Subject: perf callchain: Separate perf_reg_value function in perf_regs object Making perf_reg_value function global (formely reg_value), because it's going to be used globaly across all code providing the dwarf post unwind feature. Changing its prototype to be generic: -int reg_value(unw_word_t *valp, struct regs_dump *regs, int id) +int perf_reg_value(u64 *valp, struct regs_dump *regs, int id); Changing the valp type from libunwind specific 'unw_word_t' to u64. Signed-off-by: Jiri Olsa Acked-by: Jean Pihet Cc: Corey Ashford Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jean Pihet Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1389098853-14466-13-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/perf_regs.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tools/perf/util/perf_regs.h') diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h index a3d42cd..d6e8b6a 100644 --- a/tools/perf/util/perf_regs.h +++ b/tools/perf/util/perf_regs.h @@ -1,8 +1,14 @@ #ifndef __PERF_REGS_H #define __PERF_REGS_H +#include "types.h" +#include "event.h" + #ifdef HAVE_PERF_REGS_SUPPORT #include + +int perf_reg_value(u64 *valp, struct regs_dump *regs, int id); + #else #define PERF_REGS_MASK 0 @@ -10,5 +16,12 @@ static inline const char *perf_reg_name(int id __maybe_unused) { return NULL; } + +static inline int perf_reg_value(u64 *valp __maybe_unused, + struct regs_dump *regs __maybe_unused, + int id __maybe_unused) +{ + return 0; +} #endif /* HAVE_PERF_REGS_SUPPORT */ #endif /* __PERF_REGS_H */ -- cgit v1.1