1 // SPDX-License-Identifier: GPL-2.0 2 #ifndef __PERF_EVSEL_CONFIG_H 3 #define __PERF_EVSEL_CONFIG_H 1 4 5 #include <linux/types.h> 6 #include <stdbool.h> 7 8 /* 9 * The 'struct perf_evsel_config_term' is used to pass event 10 * specific configuration data to perf_evsel__config routine. 11 * It is allocated within event parsing and attached to 12 * perf_evsel::config_terms list head. 13 */ 14 enum evsel_term_type { 15 PERF_EVSEL__CONFIG_TERM_PERIOD, 16 PERF_EVSEL__CONFIG_TERM_FREQ, 17 PERF_EVSEL__CONFIG_TERM_TIME, 18 PERF_EVSEL__CONFIG_TERM_CALLGRAPH, 19 PERF_EVSEL__CONFIG_TERM_STACK_USER, 20 PERF_EVSEL__CONFIG_TERM_INHERIT, 21 PERF_EVSEL__CONFIG_TERM_MAX_STACK, 22 PERF_EVSEL__CONFIG_TERM_MAX_EVENTS, 23 PERF_EVSEL__CONFIG_TERM_OVERWRITE, 24 PERF_EVSEL__CONFIG_TERM_DRV_CFG, 25 PERF_EVSEL__CONFIG_TERM_BRANCH, 26 PERF_EVSEL__CONFIG_TERM_PERCORE, 27 PERF_EVSEL__CONFIG_TERM_AUX_OUTPUT, 28 }; 29 30 struct perf_evsel_config_term { 31 struct list_head list; 32 enum evsel_term_type type; 33 union { 34 u64 period; 35 u64 freq; 36 bool time; 37 char *callgraph; 38 char *drv_cfg; 39 u64 stack_user; 40 int max_stack; 41 bool inherit; 42 bool overwrite; 43 char *branch; 44 unsigned long max_events; 45 bool percore; 46 bool aux_output; 47 } val; 48 bool weak; 49 }; 50 #endif // __PERF_EVSEL_CONFIG_H 51