0001
0002 #ifndef __PERF_EVSEL_CONFIG_H
0003 #define __PERF_EVSEL_CONFIG_H 1
0004
0005 #include <linux/types.h>
0006 #include <stdbool.h>
0007
0008
0009
0010
0011
0012
0013
0014 enum evsel_term_type {
0015 EVSEL__CONFIG_TERM_PERIOD,
0016 EVSEL__CONFIG_TERM_FREQ,
0017 EVSEL__CONFIG_TERM_TIME,
0018 EVSEL__CONFIG_TERM_CALLGRAPH,
0019 EVSEL__CONFIG_TERM_STACK_USER,
0020 EVSEL__CONFIG_TERM_INHERIT,
0021 EVSEL__CONFIG_TERM_MAX_STACK,
0022 EVSEL__CONFIG_TERM_MAX_EVENTS,
0023 EVSEL__CONFIG_TERM_OVERWRITE,
0024 EVSEL__CONFIG_TERM_DRV_CFG,
0025 EVSEL__CONFIG_TERM_BRANCH,
0026 EVSEL__CONFIG_TERM_PERCORE,
0027 EVSEL__CONFIG_TERM_AUX_OUTPUT,
0028 EVSEL__CONFIG_TERM_AUX_SAMPLE_SIZE,
0029 EVSEL__CONFIG_TERM_CFG_CHG,
0030 };
0031
0032 struct evsel_config_term {
0033 struct list_head list;
0034 enum evsel_term_type type;
0035 bool free_str;
0036 union {
0037 u64 period;
0038 u64 freq;
0039 bool time;
0040 u64 stack_user;
0041 int max_stack;
0042 bool inherit;
0043 bool overwrite;
0044 unsigned long max_events;
0045 bool percore;
0046 bool aux_output;
0047 u32 aux_sample_size;
0048 u64 cfg_chg;
0049 char *str;
0050 } val;
0051 bool weak;
0052 };
0053
0054 struct evsel;
0055
0056 struct evsel_config_term *__evsel__get_config_term(struct evsel *evsel, enum evsel_term_type type);
0057
0058 #define evsel__get_config_term(evsel, type) \
0059 __evsel__get_config_term(evsel, EVSEL__CONFIG_TERM_ ## type)
0060
0061 #endif