Lines Matching refs:metric_events
31 struct metric_event *metricgroup__lookup(struct rblist *metric_events, in metricgroup__lookup() argument
40 if (!metric_events) in metricgroup__lookup()
43 nd = rblist__find(metric_events, &me); in metricgroup__lookup()
47 rblist__add_node(metric_events, &me); in metricgroup__lookup()
48 nd = rblist__find(metric_events, &me); in metricgroup__lookup()
91 free(expr->metric_events); in metric_event_delete()
98 static void metricgroup__rblist_init(struct rblist *metric_events) in metricgroup__rblist_init() argument
100 rblist__init(metric_events); in metricgroup__rblist_init()
101 metric_events->node_cmp = metric_event_cmp; in metricgroup__rblist_init()
102 metric_events->node_new = metric_event_new; in metricgroup__rblist_init()
103 metric_events->node_delete = metric_event_delete; in metricgroup__rblist_init()
106 void metricgroup__rblist_exit(struct rblist *metric_events) in metricgroup__rblist_exit() argument
108 rblist__exit(metric_events); in metricgroup__rblist_exit()
235 static bool contains_metric_id(struct evsel **metric_events, int num_events, in contains_metric_id() argument
241 if (!strcmp(evsel__metric_id(metric_events[i]), metric_id)) in contains_metric_id()
258 struct evsel **metric_events; in setup_metric_events() local
266 metric_events = calloc(sizeof(void *), ids_size + 1); in setup_metric_events()
267 if (!metric_events) in setup_metric_events()
281 if (contains_metric_id(metric_events, matched_events, metric_id)) in setup_metric_events()
289 metric_events[matched_events++] = ev; in setup_metric_events()
296 free(metric_events); in setup_metric_events()
300 ev = metric_events[i]; in setup_metric_events()
317 if (!strcmp(evsel__metric_id(metric_events[i]), metric_id)) in setup_metric_events()
318 ev->metric_leader = metric_events[i]; in setup_metric_events()
321 *out_metric_events = metric_events; in setup_metric_events()
1403 struct evsel **metric_events; in parse_groups() local
1445 ret = setup_metric_events(m->pctx->ids, metric_evlist, &metric_events); in parse_groups()
1452 me = metricgroup__lookup(metric_events_list, metric_events[0], true); in parse_groups()
1457 free(metric_events); in parse_groups()
1476 free(metric_events); in parse_groups()
1480 expr->metric_events = metric_events; in parse_groups()
1505 struct rblist *metric_events) in metricgroup__parse_groups() argument
1511 metric_no_merge, NULL, metric_events, map); in metricgroup__parse_groups()
1519 struct rblist *metric_events) in metricgroup__parse_groups_test() argument
1522 metric_no_merge, &perf_pmu__fake, metric_events, map); in metricgroup__parse_groups_test()
1605 for (nr = 0; old_expr->metric_events[nr]; nr++) in metricgroup__copy_metric_events()
1607 alloc_size = sizeof(*new_expr->metric_events); in metricgroup__copy_metric_events()
1608 new_expr->metric_events = calloc(nr + 1, alloc_size); in metricgroup__copy_metric_events()
1609 if (!new_expr->metric_events) { in metricgroup__copy_metric_events()
1617 evsel = old_expr->metric_events[idx]; in metricgroup__copy_metric_events()
1620 free(new_expr->metric_events); in metricgroup__copy_metric_events()
1625 new_expr->metric_events[idx] = evsel; in metricgroup__copy_metric_events()