From 2bcd355b71dafa5793a680c5db043abe9f708418 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Tue, 7 Aug 2012 15:20:43 +0200 Subject: perf tools: Add interface to arch registers sets Adding header files to access unified API for arch registers. util/perf_regs.h - global perf_reg declarations arch/x86/include/perf_regs.h - x86 arch specific Adding perf_reg_name function to obtain register name based on the reg ID value, and PERF_REGS_MASK macro with mask definition of all current arch registers (will be used in unwind patches). Signed-off-by: Jiri Olsa Cc: "Frank Ch. Eigler" Cc: Arun Sharma Cc: Benjamin Redelings Cc: Corey Ashford Cc: Cyrill Gorcunov Cc: Frank Ch. Eigler Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Robert Richter Cc: Stephane Eranian Cc: Tom Zanussi Cc: Ulrich Drepper Link: http://lkml.kernel.org/r/1344345647-11536-9-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/perf_regs.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tools/perf/util/perf_regs.h (limited to 'tools/perf/util/perf_regs.h') diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h new file mode 100644 index 0000000..9bd6c4e --- /dev/null +++ b/tools/perf/util/perf_regs.h @@ -0,0 +1,14 @@ +#ifndef __PERF_REGS_H +#define __PERF_REGS_H + +#ifndef NO_PERF_REGS +#include +#else +#define PERF_REGS_MASK 0 + +static inline const char *perf_reg_name(int id __used) +{ + return NULL; +} +#endif /* NO_PERF_REGS */ +#endif /* __PERF_REGS_H */ -- cgit v1.1