struct perf_evlist *evlist;
int i, ret = TEST_FAIL, err = 0, count = 0;
- struct parse_events_evlist parse_evlist;
+ struct parse_events_state parse_evlist;
struct parse_events_error parse_error;
bzero(&parse_error, sizeof(parse_error));
}
struct __add_bpf_event_param {
- struct parse_events_evlist *data;
+ struct parse_events_state *data;
struct list_head *list;
struct list_head *head_config;
};
{
LIST_HEAD(new_evsels);
struct __add_bpf_event_param *param = _param;
- struct parse_events_evlist *evlist = param->data;
+ struct parse_events_state *parse_state = param->data;
struct list_head *list = param->list;
struct perf_evsel *pos;
int err;
pr_debug("add bpf event %s:%s and attach bpf program %d\n",
group, event, fd);
- err = parse_events_add_tracepoint(&new_evsels, &evlist->idx, group,
- event, evlist->error,
+ err = parse_events_add_tracepoint(&new_evsels, &parse_state->idx, group,
+ event, parse_state->error,
param->head_config);
if (err) {
struct perf_evsel *evsel, *tmp;
return 0;
}
-int parse_events_load_bpf_obj(struct parse_events_evlist *data,
+int parse_events_load_bpf_obj(struct parse_events_state *data,
struct list_head *list,
struct bpf_object *obj,
struct list_head *head_config)
}
static int
-parse_events_config_bpf(struct parse_events_evlist *data,
+parse_events_config_bpf(struct parse_events_state *data,
struct bpf_object *obj,
struct list_head *head_config)
{
list_move_tail(&term->list, obj_head_config);
}
-int parse_events_load_bpf(struct parse_events_evlist *data,
+int parse_events_load_bpf(struct parse_events_state *data,
struct list_head *list,
char *bpf_file_name,
bool source,
err, head_config);
}
-int parse_events_add_numeric(struct parse_events_evlist *data,
+int parse_events_add_numeric(struct parse_events_state *data,
struct list_head *list,
u32 type, u64 config,
struct list_head *head_config)
get_config_name(head_config), &config_terms);
}
-int parse_events_add_pmu(struct parse_events_evlist *data,
+int parse_events_add_pmu(struct parse_events_state *data,
struct list_head *list, char *name,
struct list_head *head_config)
{
return evsel ? 0 : -ENOMEM;
}
-int parse_events_multi_pmu_add(struct parse_events_evlist *data,
+int parse_events_multi_pmu_add(struct parse_events_state *data,
char *str, struct list_head **listp)
{
struct list_head *head;
int parse_events(struct perf_evlist *evlist, const char *str,
struct parse_events_error *err)
{
- struct parse_events_evlist data = {
+ struct parse_events_state data = {
.list = LIST_HEAD_INIT(data.list),
.idx = evlist->nr_entries,
.error = err,
zfree(&a->ranges);
}
-void parse_events_evlist_error(struct parse_events_evlist *data,
+void parse_events_evlist_error(struct parse_events_state *data,
int idx, const char *str)
{
struct parse_events_error *err = data->error;
char *help; /* optional help string */
};
-struct parse_events_evlist {
+struct parse_events_state {
struct list_head list;
int idx;
int nr_groups;
const char *sys, const char *event,
struct parse_events_error *error,
struct list_head *head_config);
-int parse_events_load_bpf(struct parse_events_evlist *data,
+int parse_events_load_bpf(struct parse_events_state *data,
struct list_head *list,
char *bpf_file_name,
bool source,
struct list_head *head_config);
/* Provide this function for perf test */
struct bpf_object;
-int parse_events_load_bpf_obj(struct parse_events_evlist *data,
+int parse_events_load_bpf_obj(struct parse_events_state *data,
struct list_head *list,
struct bpf_object *obj,
struct list_head *head_config);
-int parse_events_add_numeric(struct parse_events_evlist *data,
+int parse_events_add_numeric(struct parse_events_state *data,
struct list_head *list,
u32 type, u64 config,
struct list_head *head_config);
struct list_head *head_config);
int parse_events_add_breakpoint(struct list_head *list, int *idx,
void *ptr, char *type, u64 len);
-int parse_events_add_pmu(struct parse_events_evlist *data,
+int parse_events_add_pmu(struct parse_events_state *data,
struct list_head *list, char *name,
struct list_head *head_config);
-int parse_events_multi_pmu_add(struct parse_events_evlist *data,
+int parse_events_multi_pmu_add(struct parse_events_state *data,
char *str,
struct list_head **listp);
void parse_events__set_leader(char *name, struct list_head *list);
void parse_events_update_lists(struct list_head *list_event,
struct list_head *list_all);
-void parse_events_evlist_error(struct parse_events_evlist *data,
+void parse_events_evlist_error(struct parse_events_state *data,
int idx, const char *str);
void print_events(const char *event_glob, bool name_only, bool quiet,
} while (0)
static void inc_group_count(struct list_head *list,
- struct parse_events_evlist *data)
+ struct parse_events_state *data)
{
/* Count groups only have more than 1 members */
if (!list_is_last(list->next, list))
start_events: groups
{
- struct parse_events_evlist *data = _data;
+ struct parse_events_state *data = _data;
parse_events_update_lists($1, &data->list);
}
event_legacy_cache:
PE_NAME_CACHE_TYPE '-' PE_NAME_CACHE_OP_RESULT '-' PE_NAME_CACHE_OP_RESULT opt_event_config
{
- struct parse_events_evlist *data = _data;
+ struct parse_events_state *data = _data;
struct parse_events_error *error = data->error;
struct list_head *list;
|
PE_NAME_CACHE_TYPE '-' PE_NAME_CACHE_OP_RESULT opt_event_config
{
- struct parse_events_evlist *data = _data;
+ struct parse_events_state *data = _data;
struct parse_events_error *error = data->error;
struct list_head *list;
|
PE_NAME_CACHE_TYPE opt_event_config
{
- struct parse_events_evlist *data = _data;
+ struct parse_events_state *data = _data;
struct parse_events_error *error = data->error;
struct list_head *list;
event_legacy_mem:
PE_PREFIX_MEM PE_VALUE '/' PE_VALUE ':' PE_MODIFIER_BP sep_dc
{
- struct parse_events_evlist *data = _data;
+ struct parse_events_state *data = _data;
struct list_head *list;
ALLOC_LIST(list);
|
PE_PREFIX_MEM PE_VALUE '/' PE_VALUE sep_dc
{
- struct parse_events_evlist *data = _data;
+ struct parse_events_state *data = _data;
struct list_head *list;
ALLOC_LIST(list);
|
PE_PREFIX_MEM PE_VALUE ':' PE_MODIFIER_BP sep_dc
{
- struct parse_events_evlist *data = _data;
+ struct parse_events_state *data = _data;
struct list_head *list;
ALLOC_LIST(list);
|
PE_PREFIX_MEM PE_VALUE sep_dc
{
- struct parse_events_evlist *data = _data;
+ struct parse_events_state *data = _data;
struct list_head *list;
ALLOC_LIST(list);
event_legacy_tracepoint:
tracepoint_name opt_event_config
{
- struct parse_events_evlist *data = _data;
+ struct parse_events_state *data = _data;
struct parse_events_error *error = data->error;
struct list_head *list;
event_bpf_file:
PE_BPF_OBJECT opt_event_config
{
- struct parse_events_evlist *data = _data;
+ struct parse_events_state *data = _data;
struct parse_events_error *error = data->error;
struct list_head *list;