Linux Perf
config.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PERF_CONFIG_H
3 #define __PERF_CONFIG_H
4 
5 #include <stdbool.h>
6 #include <linux/list.h>
7 
9  char *name;
10  char *value;
12  struct list_head node;
13 };
14 
16  char *name;
17  struct list_head items;
19  struct list_head node;
20 };
21 
23  struct list_head sections;
24 };
25 
26 extern const char *config_exclusive_filename;
27 
28 typedef int (*config_fn_t)(const char *, const char *, void *);
29 int perf_default_config(const char *, const char *, void *);
30 int perf_config(config_fn_t fn, void *);
31 int perf_config_int(int *dest, const char *, const char *);
32 int perf_config_u64(u64 *dest, const char *, const char *);
33 int perf_config_bool(const char *, const char *);
34 int config_error_nonbool(const char *);
35 const char *perf_etc_perfconfig(void);
36 
39 int perf_config_set__collect(struct perf_config_set *set, const char *file_name,
40  const char *var, const char *value);
41 void perf_config__exit(void);
42 void perf_config__refresh(void);
43 
49 #define perf_config_sections__for_each_entry(list, section) \
50  list_for_each_entry(section, list, node)
51 
57 #define perf_config_items__for_each_entry(list, item) \
58  list_for_each_entry(item, list, node)
59 
66 #define perf_config_set__for_each_entry(set, section, item) \
67  perf_config_sections__for_each_entry(&set->sections, section) \
68  perf_config_items__for_each_entry(&section->items, item)
69 
70 #endif /* __PERF_CONFIG_H */
Definition: mem2node.c:7
char * name
Definition: config.h:9
int perf_default_config(const char *, const char *, void *)
int config_error_nonbool(const char *)
Definition: config.c:805
struct perf_config_set * perf_config_set__new(void)
Definition: config.c:698
const char * config_exclusive_filename
Definition: config.c:40
int perf_config_set__collect(struct perf_config_set *set, const char *file_name, const char *var, const char *value)
Definition: config.c:638
char * value
Definition: config.h:10
bool from_system_config
Definition: config.h:18
bool from_system_config
Definition: config.h:11
void perf_config__refresh(void)
Definition: config.c:752
int perf_config(config_fn_t fn, void *)
Definition: config.c:718
void perf_config_set__delete(struct perf_config_set *set)
Definition: config.c:792
const char * perf_etc_perfconfig(void)
Definition: config.c:478
int perf_config_int(int *dest, const char *, const char *)
Definition: config.c:361
int(* config_fn_t)(const char *, const char *, void *)
Definition: config.h:28
void perf_config__exit(void)
Definition: config.c:746
int perf_config_u64(u64 *dest, const char *, const char *)
Definition: config.c:348
int perf_config_bool(const char *, const char *)
Definition: config.c:389