Lines Matching refs:new_expr

1754 		struct metric_expr *old_expr, *new_expr;  in metricgroup__copy_metric_events()  local
1773 new_expr = malloc(sizeof(*new_expr)); in metricgroup__copy_metric_events()
1774 if (!new_expr) in metricgroup__copy_metric_events()
1777 new_expr->metric_expr = old_expr->metric_expr; in metricgroup__copy_metric_events()
1778 new_expr->metric_name = strdup(old_expr->metric_name); in metricgroup__copy_metric_events()
1779 if (!new_expr->metric_name) in metricgroup__copy_metric_events()
1782 new_expr->metric_unit = old_expr->metric_unit; in metricgroup__copy_metric_events()
1783 new_expr->runtime = old_expr->runtime; in metricgroup__copy_metric_events()
1789 alloc_size = sizeof(*new_expr->metric_refs); in metricgroup__copy_metric_events()
1790 new_expr->metric_refs = calloc(nr + 1, alloc_size); in metricgroup__copy_metric_events()
1791 if (!new_expr->metric_refs) { in metricgroup__copy_metric_events()
1792 free(new_expr); in metricgroup__copy_metric_events()
1796 memcpy(new_expr->metric_refs, old_expr->metric_refs, in metricgroup__copy_metric_events()
1799 new_expr->metric_refs = NULL; in metricgroup__copy_metric_events()
1805 alloc_size = sizeof(*new_expr->metric_events); in metricgroup__copy_metric_events()
1806 new_expr->metric_events = calloc(nr + 1, alloc_size); in metricgroup__copy_metric_events()
1807 if (!new_expr->metric_events) { in metricgroup__copy_metric_events()
1808 free(new_expr->metric_refs); in metricgroup__copy_metric_events()
1809 free(new_expr); in metricgroup__copy_metric_events()
1818 free(new_expr->metric_events); in metricgroup__copy_metric_events()
1819 free(new_expr->metric_refs); in metricgroup__copy_metric_events()
1820 free(new_expr); in metricgroup__copy_metric_events()
1823 new_expr->metric_events[idx] = evsel; in metricgroup__copy_metric_events()
1826 list_add(&new_expr->nd, &new_me->head); in metricgroup__copy_metric_events()