Jiri Olsa | 2bcd355 | 2012-08-07 15:20:43 +0200 | [diff] [blame] | 1 | #ifndef __PERF_REGS_H |
| 2 | #define __PERF_REGS_H |
| 3 | |
Borislav Petkov | d944c4e | 2014-04-25 21:31:02 +0200 | [diff] [blame] | 4 | #include <linux/types.h> |
Jiri Olsa | c9b951c | 2014-01-07 13:47:29 +0100 | [diff] [blame] | 5 | #include "event.h" |
| 6 | |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 7 | #ifdef HAVE_PERF_REGS_SUPPORT |
Jiri Olsa | 2bcd355 | 2012-08-07 15:20:43 +0200 | [diff] [blame] | 8 | #include <perf_regs.h> |
Jiri Olsa | c9b951c | 2014-01-07 13:47:29 +0100 | [diff] [blame] | 9 | |
| 10 | int perf_reg_value(u64 *valp, struct regs_dump *regs, int id); |
| 11 | |
Jiri Olsa | 2bcd355 | 2012-08-07 15:20:43 +0200 | [diff] [blame] | 12 | #else |
| 13 | #define PERF_REGS_MASK 0 |
| 14 | |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 15 | static inline const char *perf_reg_name(int id __maybe_unused) |
Jiri Olsa | 2bcd355 | 2012-08-07 15:20:43 +0200 | [diff] [blame] | 16 | { |
| 17 | return NULL; |
| 18 | } |
Jiri Olsa | c9b951c | 2014-01-07 13:47:29 +0100 | [diff] [blame] | 19 | |
| 20 | static 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 | } |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 26 | #endif /* HAVE_PERF_REGS_SUPPORT */ |
Jiri Olsa | 2bcd355 | 2012-08-07 15:20:43 +0200 | [diff] [blame] | 27 | #endif /* __PERF_REGS_H */ |