Lines Matching full:term
721 struct parse_events_term *term, *cloned; in pmu_alias_terms() local
725 list_for_each_entry(term, &alias->terms.terms, list) { in pmu_alias_terms()
726 int ret = parse_events_term__clone(&cloned, term); in pmu_alias_terms()
1213 * by passing a config term on the command line.
1224 struct evsel_config_term *term = evsel__get_config_term(evsel, CFG_CHG); in evsel__set_config_if_unset() local
1226 if (term) in evsel__set_config_if_unset()
1227 user_bits = term->val.cfg_chg; in evsel__set_config_if_unset()
1312 * Term is a string term, and might be a param-term. Try to look up it's value
1314 * - We have a term like "base-or-format-term=param-term",
1315 * - We need to find the value supplied for "param-term" (with param-term named
1316 * in a config string) later on in the term list.
1318 static int pmu_resolve_param_term(struct parse_events_term *term, in pmu_resolve_param_term() argument
1326 t->config && !strcmp(t->config, term->config)) { in pmu_resolve_param_term()
1334 printf("Required parameter '%s' not specified\n", term->config); in pmu_resolve_param_term()
1363 * user input data - term parameter.
1367 struct parse_events_term *term, in pmu_config_term() argument
1379 if (term->used) in pmu_config_term()
1386 if (parse_events__is_hardcoded_term(term)) in pmu_config_term()
1389 format = pmu_find_format(&pmu->format, term->config); in pmu_config_term()
1396 "unknown term '%s' for pmu '%s'", in pmu_config_term()
1397 term->config, pmu->name) < 0) in pmu_config_term()
1401 parse_events_error__handle(err, term->err_term, in pmu_config_term()
1430 * Either directly use a numeric term, or try to translate string terms in pmu_config_term()
1433 if (term->type_val == PARSE_EVENTS__TERM_TYPE_NUM) { in pmu_config_term()
1434 if (term->no_value && in pmu_config_term()
1437 parse_events_error__handle(err, term->err_val, in pmu_config_term()
1438 strdup("no value assigned for term"), in pmu_config_term()
1444 val = term->val.num; in pmu_config_term()
1445 } else if (term->type_val == PARSE_EVENTS__TERM_TYPE_STR) { in pmu_config_term()
1446 if (strcmp(term->val.str, "?")) { in pmu_config_term()
1449 term->config, term->val.str); in pmu_config_term()
1452 parse_events_error__handle(err, term->err_val, in pmu_config_term()
1459 if (pmu_resolve_param_term(term, head_terms, &val)) in pmu_config_term()
1469 parse_events_error__handle(err, term->err_val, in pmu_config_term()
1493 struct parse_events_term *term; in perf_pmu__config_terms() local
1495 list_for_each_entry(term, &terms->terms, list) { in perf_pmu__config_terms()
1496 if (pmu_config_term(pmu, attr, term, terms, zero, err)) in perf_pmu__config_terms()
1522 struct parse_events_term *term) in pmu_find_alias() argument
1527 if (parse_events__is_hardcoded_term(term)) in pmu_find_alias()
1530 if (term->type_val == PARSE_EVENTS__TERM_TYPE_NUM) { in pmu_find_alias()
1531 if (!term->no_value) in pmu_find_alias()
1533 if (pmu_find_format(&pmu->format, term->config)) in pmu_find_alias()
1535 name = term->config; in pmu_find_alias()
1537 } else if (term->type_val == PARSE_EVENTS__TERM_TYPE_STR) { in pmu_find_alias()
1538 if (strcasecmp(term->config, "event")) in pmu_find_alias()
1540 name = term->val.str; in pmu_find_alias()
1568 * Only one term in event definition can in check_info_data()
1611 struct parse_events_term *term, *h; in perf_pmu__check_alias() local
1630 list_for_each_entry_safe(term, h, &head_terms->terms, list) { in perf_pmu__check_alias()
1631 alias = pmu_find_alias(pmu, term); in perf_pmu__check_alias()
1634 ret = pmu_alias_terms(alias, term->err_term, &term->list); in perf_pmu__check_alias()
1636 parse_events_error__handle(err, term->err_term, in perf_pmu__check_alias()
1642 ret = check_info_data(pmu, alias, info, err, term->err_term); in perf_pmu__check_alias()
1649 list_del_init(&term->list); in perf_pmu__check_alias()
1650 parse_events_term__delete(term); in perf_pmu__check_alias()
1827 struct parse_events_term *term; in format_alias() local
1832 list_for_each_entry(term, &alias->terms.terms, list) { in format_alias()
1833 if (term->type_val == PARSE_EVENTS__TERM_TYPE_STR) in format_alias()
1835 ",%s=%s", term->config, in format_alias()
1836 term->val.str); in format_alias()