Lines Matching refs:new_expr

1787 		struct metric_expr *old_expr, *new_expr;  in metricgroup__copy_metric_events()  local
1806 new_expr = malloc(sizeof(*new_expr)); in metricgroup__copy_metric_events()
1807 if (!new_expr) in metricgroup__copy_metric_events()
1810 new_expr->metric_expr = old_expr->metric_expr; in metricgroup__copy_metric_events()
1811 new_expr->metric_threshold = old_expr->metric_threshold; in metricgroup__copy_metric_events()
1812 new_expr->metric_name = strdup(old_expr->metric_name); in metricgroup__copy_metric_events()
1813 if (!new_expr->metric_name) in metricgroup__copy_metric_events()
1816 new_expr->metric_unit = old_expr->metric_unit; in metricgroup__copy_metric_events()
1817 new_expr->runtime = old_expr->runtime; in metricgroup__copy_metric_events()
1823 alloc_size = sizeof(*new_expr->metric_refs); in metricgroup__copy_metric_events()
1824 new_expr->metric_refs = calloc(nr + 1, alloc_size); in metricgroup__copy_metric_events()
1825 if (!new_expr->metric_refs) { in metricgroup__copy_metric_events()
1826 free(new_expr); in metricgroup__copy_metric_events()
1830 memcpy(new_expr->metric_refs, old_expr->metric_refs, in metricgroup__copy_metric_events()
1833 new_expr->metric_refs = NULL; in metricgroup__copy_metric_events()
1839 alloc_size = sizeof(*new_expr->metric_events); in metricgroup__copy_metric_events()
1840 new_expr->metric_events = calloc(nr + 1, alloc_size); in metricgroup__copy_metric_events()
1841 if (!new_expr->metric_events) { in metricgroup__copy_metric_events()
1842 zfree(&new_expr->metric_refs); in metricgroup__copy_metric_events()
1843 free(new_expr); in metricgroup__copy_metric_events()
1852 zfree(&new_expr->metric_events); in metricgroup__copy_metric_events()
1853 zfree(&new_expr->metric_refs); in metricgroup__copy_metric_events()
1854 free(new_expr); in metricgroup__copy_metric_events()
1857 new_expr->metric_events[idx] = evsel; in metricgroup__copy_metric_events()
1860 list_add(&new_expr->nd, &new_me->head); in metricgroup__copy_metric_events()