Lines Matching refs:parse_state

45 int parse_events_parse(void *parse_state, void *scanner);
630 struct parse_events_state *parse_state; member
640 struct parse_events_state *parse_state = param->parse_state; in add_bpf_event() local
657 err = parse_events_add_tracepoint(&new_evsels, &parse_state->idx, group, in add_bpf_event()
658 event, parse_state->error, in add_bpf_event()
683 int parse_events_load_bpf_obj(struct parse_events_state *parse_state, in parse_events_load_bpf_obj() argument
690 struct __add_bpf_event_param param = {parse_state, list, head_config}; in parse_events_load_bpf_obj()
731 parse_state->error->help = strdup("(add -v to see detail)"); in parse_events_load_bpf_obj()
732 parse_state->error->str = strdup(errbuf); in parse_events_load_bpf_obj()
737 parse_events_config_bpf(struct parse_events_state *parse_state, in parse_events_config_bpf() argument
756 parse_state->error->idx = term->err_term; in parse_events_config_bpf()
757 parse_state->error->str = strdup(errbuf); in parse_events_config_bpf()
761 err = bpf__config_obj(obj, term, parse_state->evlist, &error_pos); in parse_events_config_bpf()
763 bpf__strerror_config_obj(obj, term, parse_state->evlist, in parse_events_config_bpf()
766 parse_state->error->help = strdup( in parse_events_config_bpf()
773 parse_state->error->str = strdup(errbuf); in parse_events_config_bpf()
775 parse_state->error->idx = term->err_val; in parse_events_config_bpf()
777 parse_state->error->idx = term->err_term + error_pos; in parse_events_config_bpf()
813 int parse_events_load_bpf(struct parse_events_state *parse_state, in parse_events_load_bpf() argument
841 parse_state->error->help = strdup("(add -v to see detail)"); in parse_events_load_bpf()
842 parse_state->error->str = strdup(errbuf); in parse_events_load_bpf()
846 err = parse_events_load_bpf_obj(parse_state, list, obj, head_config); in parse_events_load_bpf()
849 err = parse_events_config_bpf(parse_state, obj, &obj_head_config); in parse_events_load_bpf()
1266 int parse_events_add_numeric(struct parse_events_state *parse_state, in parse_events_add_numeric() argument
1279 if (config_attr(&attr, head_config, parse_state->error, in parse_events_add_numeric()
1287 return add_event(list, &parse_state->idx, &attr, in parse_events_add_numeric()
1291 int parse_events_add_tool(struct parse_events_state *parse_state, in parse_events_add_tool() argument
1295 return add_event_tool(list, &parse_state->idx, tool_event); in parse_events_add_tool()
1310 int parse_events_add_pmu(struct parse_events_state *parse_state, in parse_events_add_pmu() argument
1320 struct parse_events_error *err = parse_state->error; in parse_events_add_pmu()
1344 evsel = __add_event(list, &parse_state->idx, &attr, NULL, pmu, NULL, in parse_events_add_pmu()
1362 if (config_attr(&attr, head_config, parse_state->error, config_term_pmu)) in parse_events_add_pmu()
1368 if (perf_pmu__config(pmu, &attr, head_config, parse_state->error)) in parse_events_add_pmu()
1371 evsel = __add_event(list, &parse_state->idx, &attr, in parse_events_add_pmu()
1389 int parse_events_multi_pmu_add(struct parse_events_state *parse_state, in parse_events_multi_pmu_add() argument
1418 if (!parse_events_add_pmu(parse_state, list, in parse_events_multi_pmu_add()
1464 struct parse_events_state *parse_state) in parse_events__set_leader_for_uncore_aliase() argument
1514 parse_state->nr_groups--; in parse_events__set_leader_for_uncore_aliase()
1545 parse_state->nr_groups += nr_pmu - 1; in parse_events__set_leader_for_uncore_aliase()
1555 struct parse_events_state *parse_state) in parse_events__set_leader() argument
1564 if (parse_events__set_leader_for_uncore_aliase(name, list, parse_state)) in parse_events__set_leader()
1873 static int parse_events__scanner(const char *str, void *parse_state, int start_token) in parse_events__scanner() argument
1888 ret = parse_events_parse(parse_state, scanner); in parse_events__scanner()
1901 struct parse_events_state parse_state = { in parse_events_terms() local
1906 ret = parse_events__scanner(str, &parse_state, PE_START_TERMS); in parse_events_terms()
1908 list_splice(parse_state.terms, terms); in parse_events_terms()
1909 zfree(&parse_state.terms); in parse_events_terms()
1913 parse_events_terms__delete(parse_state.terms); in parse_events_terms()
1920 struct parse_events_state parse_state = { in parse_events() local
1921 .list = LIST_HEAD_INIT(parse_state.list), in parse_events()
1928 ret = parse_events__scanner(str, &parse_state, PE_START_EVENTS); in parse_events()
1933 if (list_empty(&parse_state.list)) { in parse_events()
1938 perf_evlist__splice_list_tail(evlist, &parse_state.list); in parse_events()
1939 evlist->nr_groups += parse_state.nr_groups; in parse_events()
2797 void parse_events_evlist_error(struct parse_events_state *parse_state, in parse_events_evlist_error() argument
2800 struct parse_events_error *err = parse_state->error; in parse_events_evlist_error()