aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/perf_regs.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2014-01-07 07:47:29 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-02-18 07:34:49 -0500
commitc9b951c4d12f0b2e9a07dd459c554bc05628d092 (patch)
treecaa1bbe8ea8ccf5490589bf366215218068f0a4f /tools/perf/util/perf_regs.h
parent9ff125d132001c02d32a193a9423be0690526e11 (diff)
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 <jolsa@redhat.com> Acked-by: Jean Pihet <jean.pihet@linaro.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jean Pihet <jean.pihet@linaro.org> 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/1389098853-14466-13-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/perf_regs.h')
-rw-r--r--tools/perf/util/perf_regs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h
index a3d42cd74919..d6e8b6a8d7f3 100644
--- a/tools/perf/util/perf_regs.h
+++ b/tools/perf/util/perf_regs.h
@@ -1,8 +1,14 @@
1#ifndef __PERF_REGS_H 1#ifndef __PERF_REGS_H
2#define __PERF_REGS_H 2#define __PERF_REGS_H
3 3
4#include "types.h"
5#include "event.h"
6
4#ifdef HAVE_PERF_REGS_SUPPORT 7#ifdef HAVE_PERF_REGS_SUPPORT
5#include <perf_regs.h> 8#include <perf_regs.h>
9
10int perf_reg_value(u64 *valp, struct regs_dump *regs, int id);
11
6#else 12#else
7#define PERF_REGS_MASK 0 13#define PERF_REGS_MASK 0
8 14
@@ -10,5 +16,12 @@ static inline const char *perf_reg_name(int id __maybe_unused)
10{ 16{
11 return NULL; 17 return NULL;
12} 18}
19
20static inline int perf_reg_value(u64 *valp __maybe_unused,
21 struct regs_dump *regs __maybe_unused,
22 int id __maybe_unused)
23{
24 return 0;
25}
13#endif /* HAVE_PERF_REGS_SUPPORT */ 26#endif /* HAVE_PERF_REGS_SUPPORT */
14#endif /* __PERF_REGS_H */ 27#endif /* __PERF_REGS_H */