]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - tools/perf/util/perf_regs.h
perf tools: Move extra string util functions to util/string2.h
[mirror_ubuntu-artful-kernel.git] / tools / perf / util / perf_regs.h
CommitLineData
2bcd355b
JO
1#ifndef __PERF_REGS_H
2#define __PERF_REGS_H
3
d944c4ee 4#include <linux/types.h>
9fb47654 5#include <linux/compiler.h>
0c4e774f
JO
6
7struct regs_dump;
c9b951c4 8
c5e991ee
SE
9struct sample_reg {
10 const char *name;
11 uint64_t mask;
12};
af4aeadd
SE
13#define SMPL_REG(n, b) { .name = #n, .mask = 1ULL << (b) }
14#define SMPL_REG_END { .name = NULL }
c5e991ee
SE
15
16extern const struct sample_reg sample_reg_masks[];
17
d451a205
RB
18enum {
19 SDT_ARG_VALID = 0,
20 SDT_ARG_SKIP,
21};
22
23int arch_sdt_arg_parse_op(char *old_op, char **new_op);
3b1f8311 24
89fe808a 25#ifdef HAVE_PERF_REGS_SUPPORT
2bcd355b 26#include <perf_regs.h>
c9b951c4
JO
27
28int perf_reg_value(u64 *valp, struct regs_dump *regs, int id);
29
2bcd355b
JO
30#else
31#define PERF_REGS_MASK 0
0c4e774f 32#define PERF_REGS_MAX 0
2bcd355b 33
1d037ca1 34static inline const char *perf_reg_name(int id __maybe_unused)
2bcd355b
JO
35{
36 return NULL;
37}
c9b951c4
JO
38
39static inline int perf_reg_value(u64 *valp __maybe_unused,
40 struct regs_dump *regs __maybe_unused,
41 int id __maybe_unused)
42{
43 return 0;
44}
89fe808a 45#endif /* HAVE_PERF_REGS_SUPPORT */
2bcd355b 46#endif /* __PERF_REGS_H */