]> git.karo-electronics.de Git - karo-tx-linux.git/blob - tools/perf/util/config.h
perf config: Move config declarations from util/cache.h to util/config.h
[karo-tx-linux.git] / tools / perf / util / config.h
1 #ifndef __PERF_CONFIG_H
2 #define __PERF_CONFIG_H
3
4 #include <stdbool.h>
5 #include <linux/list.h>
6
7 struct perf_config_item {
8         char *name;
9         char *value;
10         struct list_head node;
11 };
12
13 struct perf_config_section {
14         char *name;
15         struct list_head items;
16         struct list_head node;
17 };
18
19 struct perf_config_set {
20         struct list_head sections;
21 };
22
23 extern const char *config_exclusive_filename;
24
25 typedef int (*config_fn_t)(const char *, const char *, void *);
26 int perf_default_config(const char *, const char *, void *);
27 int perf_config(config_fn_t fn, void *);
28 int perf_config_int(const char *, const char *);
29 u64 perf_config_u64(const char *, const char *);
30 int perf_config_bool(const char *, const char *);
31 int config_error_nonbool(const char *);
32 const char *perf_etc_perfconfig(void);
33
34 struct perf_config_set *perf_config_set__new(void);
35 void perf_config_set__delete(struct perf_config_set *set);
36
37 #endif /* __PERF_CONFIG_H */