perf/x86: Add list of register names
[firefly-linux-kernel-4.4.55.git] / tools / perf / util / perf_regs.h
1 #ifndef __PERF_REGS_H
2 #define __PERF_REGS_H
3
4 #include <linux/types.h>
5
6 struct regs_dump;
7
8 struct sample_reg {
9         const char *name;
10         uint64_t mask;
11 };
12
13 extern const struct sample_reg sample_reg_masks[];
14
15 #ifdef HAVE_PERF_REGS_SUPPORT
16 #include <perf_regs.h>
17
18 int perf_reg_value(u64 *valp, struct regs_dump *regs, int id);
19
20 #else
21 #define PERF_REGS_MASK  0
22 #define PERF_REGS_MAX   0
23
24 static inline const char *perf_reg_name(int id __maybe_unused)
25 {
26         return NULL;
27 }
28
29 static inline int perf_reg_value(u64 *valp __maybe_unused,
30                                  struct regs_dump *regs __maybe_unused,
31                                  int id __maybe_unused)
32 {
33         return 0;
34 }
35 #endif /* HAVE_PERF_REGS_SUPPORT */
36 #endif /* __PERF_REGS_H */