Lines Matching refs:new_expr

1307 		struct metric_expr *old_expr, *new_expr;  in metricgroup__copy_metric_events()  local
1326 new_expr = malloc(sizeof(*new_expr)); in metricgroup__copy_metric_events()
1327 if (!new_expr) in metricgroup__copy_metric_events()
1330 new_expr->metric_expr = old_expr->metric_expr; in metricgroup__copy_metric_events()
1331 new_expr->metric_name = old_expr->metric_name; in metricgroup__copy_metric_events()
1332 new_expr->metric_unit = old_expr->metric_unit; in metricgroup__copy_metric_events()
1333 new_expr->runtime = old_expr->runtime; in metricgroup__copy_metric_events()
1339 alloc_size = sizeof(*new_expr->metric_refs); in metricgroup__copy_metric_events()
1340 new_expr->metric_refs = calloc(nr + 1, alloc_size); in metricgroup__copy_metric_events()
1341 if (!new_expr->metric_refs) { in metricgroup__copy_metric_events()
1342 free(new_expr); in metricgroup__copy_metric_events()
1346 memcpy(new_expr->metric_refs, old_expr->metric_refs, in metricgroup__copy_metric_events()
1349 new_expr->metric_refs = NULL; in metricgroup__copy_metric_events()
1355 alloc_size = sizeof(*new_expr->metric_events); in metricgroup__copy_metric_events()
1356 new_expr->metric_events = calloc(nr + 1, alloc_size); in metricgroup__copy_metric_events()
1357 if (!new_expr->metric_events) { in metricgroup__copy_metric_events()
1358 free(new_expr->metric_refs); in metricgroup__copy_metric_events()
1359 free(new_expr); in metricgroup__copy_metric_events()
1368 free(new_expr->metric_events); in metricgroup__copy_metric_events()
1369 free(new_expr->metric_refs); in metricgroup__copy_metric_events()
1370 free(new_expr); in metricgroup__copy_metric_events()
1373 new_expr->metric_events[idx] = evsel; in metricgroup__copy_metric_events()
1376 list_add(&new_expr->nd, &new_me->head); in metricgroup__copy_metric_events()