xref: /openbmc/linux/tools/perf/util/perf_regs.h (revision 8b036556)
1 #ifndef __PERF_REGS_H
2 #define __PERF_REGS_H
3 
4 #include <linux/types.h>
5 
6 struct regs_dump;
7 
8 #ifdef HAVE_PERF_REGS_SUPPORT
9 #include <perf_regs.h>
10 
11 int perf_reg_value(u64 *valp, struct regs_dump *regs, int id);
12 
13 #else
14 #define PERF_REGS_MASK	0
15 #define PERF_REGS_MAX	0
16 
17 static inline const char *perf_reg_name(int id __maybe_unused)
18 {
19 	return NULL;
20 }
21 
22 static inline int perf_reg_value(u64 *valp __maybe_unused,
23 				 struct regs_dump *regs __maybe_unused,
24 				 int id __maybe_unused)
25 {
26 	return 0;
27 }
28 #endif /* HAVE_PERF_REGS_SUPPORT */
29 #endif /* __PERF_REGS_H */
30