FreeBSD/usr.sbin/pmcannotate/pmcannotate.c
/*
 * Create a new first-level aggregation object for a specified
 * function.
 */
Create a new first-level aggregation object for a specified
function.
Create a new first - level aggregation object for a specified function .
static struct aggent *
agg_create(const char *name, u_int nsamples, uintptr_t start, uintptr_t end)
{
	struct aggent *agg;
	agg = calloc(1, sizeof(struct aggent));
	if (agg == NULL)
		return (NULL);
	agg->ag_name = strdup(name);
	if (agg->ag_name == NULL) {
		free(agg);
		return (NULL);
	}
	agg->ag_nsamples = nsamples;
	agg->ag_ostart = start;
	agg->ag_oend = end;
	return (agg);
}
static struct aggent * agg_create ( const char * name , u_int nsamples , uintptr_t start , uintptr_t end ) { struct aggent * agg ; agg = calloc ( 1 , sizeof ( struct aggent ) ) ; if ( agg == NULL ) return ( NULL ) ; agg -> ag_name = strdup ( name ) ; if ( agg -> ag_name == NULL ) { free ( agg ) ; return ( NULL ) ; } agg -> ag_nsamples = nsamples ; agg -> ag_ostart = start ; agg -> ag_oend = end ; return ( agg ) ; }
Create a new first-level aggregation object for a specified
 function.
Create a new first - level aggregation object for a specified function .