2019-09-24 21:56:14 +03:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#ifndef __PERF_EVSEL_CONFIG_H
|
|
|
|
#define __PERF_EVSEL_CONFIG_H 1
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
/*
|
2020-05-06 19:05:08 +03:00
|
|
|
* The 'struct evsel_config_term' is used to pass event
|
2020-04-29 21:57:01 +03:00
|
|
|
* specific configuration data to evsel__config routine.
|
2019-09-24 21:56:14 +03:00
|
|
|
* It is allocated within event parsing and attached to
|
2020-05-06 19:05:08 +03:00
|
|
|
* evsel::config_terms list head.
|
2019-09-24 21:56:14 +03:00
|
|
|
*/
|
|
|
|
enum evsel_term_type {
|
2020-05-06 19:05:08 +03:00
|
|
|
EVSEL__CONFIG_TERM_PERIOD,
|
|
|
|
EVSEL__CONFIG_TERM_FREQ,
|
|
|
|
EVSEL__CONFIG_TERM_TIME,
|
|
|
|
EVSEL__CONFIG_TERM_CALLGRAPH,
|
|
|
|
EVSEL__CONFIG_TERM_STACK_USER,
|
|
|
|
EVSEL__CONFIG_TERM_INHERIT,
|
|
|
|
EVSEL__CONFIG_TERM_MAX_STACK,
|
|
|
|
EVSEL__CONFIG_TERM_MAX_EVENTS,
|
|
|
|
EVSEL__CONFIG_TERM_OVERWRITE,
|
|
|
|
EVSEL__CONFIG_TERM_DRV_CFG,
|
|
|
|
EVSEL__CONFIG_TERM_BRANCH,
|
|
|
|
EVSEL__CONFIG_TERM_PERCORE,
|
|
|
|
EVSEL__CONFIG_TERM_AUX_OUTPUT,
|
|
|
|
EVSEL__CONFIG_TERM_AUX_SAMPLE_SIZE,
|
|
|
|
EVSEL__CONFIG_TERM_CFG_CHG,
|
2019-09-24 21:56:14 +03:00
|
|
|
};
|
|
|
|
|
2020-05-06 19:05:08 +03:00
|
|
|
struct evsel_config_term {
|
2019-09-24 21:56:14 +03:00
|
|
|
struct list_head list;
|
|
|
|
enum evsel_term_type type;
|
2020-01-17 08:52:51 +03:00
|
|
|
bool free_str;
|
2019-09-24 21:56:14 +03:00
|
|
|
union {
|
|
|
|
u64 period;
|
|
|
|
u64 freq;
|
|
|
|
bool time;
|
|
|
|
u64 stack_user;
|
|
|
|
int max_stack;
|
|
|
|
bool inherit;
|
|
|
|
bool overwrite;
|
|
|
|
unsigned long max_events;
|
|
|
|
bool percore;
|
|
|
|
bool aux_output;
|
2019-11-15 15:42:17 +03:00
|
|
|
u32 aux_sample_size;
|
2019-11-15 15:42:22 +03:00
|
|
|
u64 cfg_chg;
|
2020-01-17 08:52:50 +03:00
|
|
|
char *str;
|
2019-09-24 21:56:14 +03:00
|
|
|
} val;
|
|
|
|
bool weak;
|
|
|
|
};
|
2019-11-15 15:42:17 +03:00
|
|
|
|
|
|
|
struct evsel;
|
|
|
|
|
2020-05-06 19:05:08 +03:00
|
|
|
struct evsel_config_term *__evsel__get_config_term(struct evsel *evsel, enum evsel_term_type type);
|
2019-11-15 15:42:17 +03:00
|
|
|
|
2020-05-06 19:05:08 +03:00
|
|
|
#define evsel__get_config_term(evsel, type) \
|
|
|
|
__evsel__get_config_term(evsel, EVSEL__CONFIG_TERM_ ## type)
|
2019-11-15 15:42:17 +03:00
|
|
|
|
2019-09-24 21:56:14 +03:00
|
|
|
#endif // __PERF_EVSEL_CONFIG_H
|