]>
Commit | Line | Data |
---|---|---|
2bcd355b JO |
1 | #ifndef __PERF_REGS_H |
2 | #define __PERF_REGS_H | |
3 | ||
d944c4ee | 4 | #include <linux/types.h> |
0c4e774f JO |
5 | |
6 | struct regs_dump; | |
c9b951c4 | 7 | |
c5e991ee SE |
8 | struct sample_reg { |
9 | const char *name; | |
10 | uint64_t mask; | |
11 | }; | |
af4aeadd SE |
12 | #define SMPL_REG(n, b) { .name = #n, .mask = 1ULL << (b) } |
13 | #define SMPL_REG_END { .name = NULL } | |
c5e991ee SE |
14 | |
15 | extern const struct sample_reg sample_reg_masks[]; | |
16 | ||
89fe808a | 17 | #ifdef HAVE_PERF_REGS_SUPPORT |
2bcd355b | 18 | #include <perf_regs.h> |
c9b951c4 JO |
19 | |
20 | int perf_reg_value(u64 *valp, struct regs_dump *regs, int id); | |
21 | ||
2bcd355b JO |
22 | #else |
23 | #define PERF_REGS_MASK 0 | |
0c4e774f | 24 | #define PERF_REGS_MAX 0 |
2bcd355b | 25 | |
1d037ca1 | 26 | static inline const char *perf_reg_name(int id __maybe_unused) |
2bcd355b JO |
27 | { |
28 | return NULL; | |
29 | } | |
c9b951c4 JO |
30 | |
31 | static inline int perf_reg_value(u64 *valp __maybe_unused, | |
32 | struct regs_dump *regs __maybe_unused, | |
33 | int id __maybe_unused) | |
34 | { | |
35 | return 0; | |
36 | } | |
89fe808a | 37 | #endif /* HAVE_PERF_REGS_SUPPORT */ |
2bcd355b | 38 | #endif /* __PERF_REGS_H */ |