perf probe: Add sdt probes arguments into the uprobe cmd string
[linux-2.6-microblaze.git] / tools / perf / util / perf_regs.h
1 #ifndef __PERF_REGS_H
2 #define __PERF_REGS_H
3
4 #include <linux/types.h>
5 #include <linux/compiler.h>
6
7 struct regs_dump;
8
9 struct sample_reg {
10         const char *name;
11         uint64_t mask;
12 };
13 #define SMPL_REG(n, b) { .name = #n, .mask = 1ULL << (b) }
14 #define SMPL_REG_END { .name = NULL }
15
16 extern const struct sample_reg sample_reg_masks[];
17
18 /*
19  * The table sdt_reg_renamings is used for adjusting gcc/gas-generated
20  * registers before filling the uprobe tracer interface.
21  */
22 int sdt_rename_register(char **pdesc, char *old_name);
23
24 #ifdef HAVE_PERF_REGS_SUPPORT
25 #include <perf_regs.h>
26
27 int perf_reg_value(u64 *valp, struct regs_dump *regs, int id);
28
29 #else
30 #define PERF_REGS_MASK  0
31 #define PERF_REGS_MAX   0
32
33 static inline const char *perf_reg_name(int id __maybe_unused)
34 {
35         return NULL;
36 }
37
38 static inline int perf_reg_value(u64 *valp __maybe_unused,
39                                  struct regs_dump *regs __maybe_unused,
40                                  int id __maybe_unused)
41 {
42         return 0;
43 }
44 #endif /* HAVE_PERF_REGS_SUPPORT */
45 #endif /* __PERF_REGS_H */