Lines Matching refs:metric_events

35 struct metric_event *metricgroup__lookup(struct rblist *metric_events,  in metricgroup__lookup()  argument
44 if (!metric_events) in metricgroup__lookup()
49 nd = rblist__find(metric_events, &me); in metricgroup__lookup()
53 rblist__add_node(metric_events, &me); in metricgroup__lookup()
54 nd = rblist__find(metric_events, &me); in metricgroup__lookup()
98 zfree(&expr->metric_events); in metric_event_delete()
105 static void metricgroup__rblist_init(struct rblist *metric_events) in metricgroup__rblist_init() argument
107 rblist__init(metric_events); in metricgroup__rblist_init()
108 metric_events->node_cmp = metric_event_cmp; in metricgroup__rblist_init()
109 metric_events->node_new = metric_event_new; in metricgroup__rblist_init()
110 metric_events->node_delete = metric_event_delete; in metricgroup__rblist_init()
113 void metricgroup__rblist_exit(struct rblist *metric_events) in metricgroup__rblist_exit() argument
115 rblist__exit(metric_events); in metricgroup__rblist_exit()
258 static bool contains_metric_id(struct evsel **metric_events, int num_events, in contains_metric_id() argument
264 if (!strcmp(evsel__metric_id(metric_events[i]), metric_id)) in contains_metric_id()
282 struct evsel **metric_events; in setup_metric_events() local
291 metric_events = calloc(ids_size + 1, sizeof(void *)); in setup_metric_events()
292 if (!metric_events) in setup_metric_events()
310 if (contains_metric_id(metric_events, matched_events, metric_id)) in setup_metric_events()
319 metric_events[matched_events++] = ev; in setup_metric_events()
326 free(metric_events); in setup_metric_events()
330 ev = metric_events[i]; in setup_metric_events()
348 ev->metric_leader = metric_events[i]; in setup_metric_events()
351 *out_metric_events = metric_events; in setup_metric_events()
1579 struct evsel **metric_events; in parse_groups() local
1627 metric_evlist, &metric_events); in parse_groups()
1634 me = metricgroup__lookup(metric_events_list, metric_events[0], true); in parse_groups()
1639 free(metric_events); in parse_groups()
1658 free(metric_events); in parse_groups()
1663 expr->metric_events = metric_events; in parse_groups()
1695 struct rblist *metric_events) in metricgroup__parse_groups() argument
1706 /*fake_pmu=*/false, metric_events, table); in metricgroup__parse_groups()
1712 struct rblist *metric_events) in metricgroup__parse_groups_test() argument
1720 /*fake_pmu=*/true, metric_events, table); in metricgroup__parse_groups_test()
1841 for (nr = 0; old_expr->metric_events[nr]; nr++) in metricgroup__copy_metric_events()
1843 alloc_size = sizeof(*new_expr->metric_events); in metricgroup__copy_metric_events()
1844 new_expr->metric_events = calloc(nr + 1, alloc_size); in metricgroup__copy_metric_events()
1845 if (!new_expr->metric_events) { in metricgroup__copy_metric_events()
1853 evsel = old_expr->metric_events[idx]; in metricgroup__copy_metric_events()
1856 zfree(&new_expr->metric_events); in metricgroup__copy_metric_events()
1861 new_expr->metric_events[idx] = evsel; in metricgroup__copy_metric_events()