~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/util/config.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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 
  8 struct perf_config_item {
  9         char *name;
 10         char *value;
 11         bool from_system_config;
 12         struct list_head node;
 13 };
 14 
 15 struct perf_config_section {
 16         char *name;
 17         struct list_head items;
 18         bool from_system_config;
 19         struct list_head node;
 20 };
 21 
 22 struct perf_config_set {
 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 
 30 int perf_default_config(const char *, const char *, void *);
 31 int perf_config(config_fn_t fn, void *);
 32 int perf_config_scan(const char *name, const char *fmt, ...) __scanf(2, 3);
 33 int perf_config_set(struct perf_config_set *set,
 34                     config_fn_t fn, void *data);
 35 int perf_config_int(int *dest, const char *, const char *);
 36 int perf_config_u8(u8 *dest, const char *name, const char *value);
 37 int perf_config_u64(u64 *dest, const char *, const char *);
 38 int perf_config_bool(const char *, const char *);
 39 int config_error_nonbool(const char *);
 40 const char *perf_etc_perfconfig(void);
 41 const char *perf_home_perfconfig(void);
 42 int perf_config_system(void);
 43 int perf_config_global(void);
 44 
 45 struct perf_config_set *perf_config_set__new(void);
 46 struct perf_config_set *perf_config_set__load_file(const char *file);
 47 void perf_config_set__delete(struct perf_config_set *set);
 48 int perf_config_set__collect(struct perf_config_set *set, const char *file_name,
 49                              const char *var, const char *value);
 50 void perf_config__exit(void);
 51 void perf_config__refresh(void);
 52 
 53 /**
 54  * perf_config_sections__for_each - iterate thru all the sections
 55  * @list: list_head instance to iterate
 56  * @section: struct perf_config_section iterator
 57  */
 58 #define perf_config_sections__for_each_entry(list, section)     \
 59         list_for_each_entry(section, list, node)
 60 
 61 /**
 62  * perf_config_items__for_each - iterate thru all the items
 63  * @list: list_head instance to iterate
 64  * @item: struct perf_config_item iterator
 65  */
 66 #define perf_config_items__for_each_entry(list, item)   \
 67         list_for_each_entry(item, list, node)
 68 
 69 /**
 70  * perf_config_set__for_each - iterate thru all the config section-item pairs
 71  * @set: evlist instance to iterate
 72  * @section: struct perf_config_section iterator
 73  * @item: struct perf_config_item iterator
 74  */
 75 #define perf_config_set__for_each_entry(set, section, item)                     \
 76         perf_config_sections__for_each_entry(&set->sections, section)           \
 77         perf_config_items__for_each_entry(&section->items, item)
 78 
 79 #endif /* __PERF_CONFIG_H */
 80 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php