Lines Matching refs:agg

84 static void		 agg_destroy(struct aggent *agg) __unused;
100 static void general_printasm(FILE *fp, struct aggent *agg);
101 static int general_printc(FILE *fp, struct aggent *agg);
102 static int printblock(FILE *fp, struct aggent *agg);
155 struct aggent *agg; in agg_create() local
157 agg = calloc(1, sizeof(struct aggent)); in agg_create()
158 if (agg == NULL) in agg_create()
160 agg->ag_name = strdup(name); in agg_create()
161 if (agg->ag_name == NULL) { in agg_create()
162 free(agg); in agg_create()
165 agg->ag_nsamples = nsamples; in agg_create()
166 agg->ag_ostart = start; in agg_create()
167 agg->ag_oend = end; in agg_create()
168 return (agg); in agg_create()
176 agg_destroy(struct aggent *agg) in agg_destroy() argument
179 free(agg->ag_name); in agg_destroy()
180 free(agg); in agg_destroy()
194 struct aggent *agg; in asmparse() local
202 agg = fqueue_findent_by_name(fname); in asmparse()
203 if (agg == NULL) in asmparse()
205 agg->ag_offset = ftell(fp); in asmparse()
208 TAILQ_FOREACH(agg, &fqueue, ag_fiter) { in asmparse()
209 if (fseek(fp, agg->ag_offset, SEEK_SET) == -1) in asmparse()
212 agg->ag_name, PERCSAMP(agg->ag_nsamples)); in asmparse()
213 general_printasm(fp, agg); in asmparse()
233 struct aggent *agg; in cparse() local
241 agg = fqueue_findent_by_name(fname); in cparse()
242 if (agg == NULL) in cparse()
244 agg->ag_offset = ftell(fp); in cparse()
247 TAILQ_FOREACH(agg, &fqueue, ag_fiter) { in cparse()
248 if (fseek(fp, agg->ag_offset, SEEK_SET) == -1) in cparse()
251 agg->ag_name, PERCSAMP(agg->ag_nsamples)); in cparse()
252 if (general_printc(fp, agg) == -1) in cparse()
312 struct aggent *agg, *tmpagg; in fqueue_compact() local
319 TAILQ_FOREACH_SAFE(agg, &fqueue, ag_fiter, tmpagg) in fqueue_compact()
320 if (agg->ag_nsamples < thi) in fqueue_compact()
321 TAILQ_REMOVE(&fqueue, agg, ag_fiter); in fqueue_compact()
330 struct aggent *agg; in fqueue_deleteall() local
333 agg = TAILQ_FIRST(&fqueue); in fqueue_deleteall()
334 TAILQ_REMOVE(&fqueue, agg, ag_fiter); in fqueue_deleteall()
425 struct aggent *agg; in fqueue_getall() local
430 TAILQ_FOREACH(agg, &fqueue, ag_fiter) { in fqueue_getall()
432 start = agg->ag_ostart; in fqueue_getall()
433 end = agg->ag_oend; in fqueue_getall()
512 general_printasm(FILE *fp, struct aggent *agg) in general_printasm() argument
533 (float)obj->en_nsamples * 100 / agg->ag_nsamples, in general_printasm()
547 general_printc(FILE *fp, struct aggent *agg) in general_printc() argument
555 if (printblock(fp, agg) == -1) in general_printc()
570 printblock(FILE *fp, struct aggent *agg) in printblock() argument
627 (float)tnsamples * 100 / agg->ag_nsamples, buffer); in printblock()