FreeBSD/usr.sbin/pmcannotate/pmcannotate.c
/*
 * Return the number of object in the first-level aggregations queue.
 */
Return the number of object in the first-level aggregations queue.
Return the number of object in the first - level aggregations queue .
static int
fqueue_getall(const char *bin, char *temp, int asmf)
{
	char tmpf[MAXPATHLEN * 2 + 50];
	struct aggent *agg;
	uintptr_t start, end;
	if (mkstemp(temp) == -1)
		return (-1);
	TAILQ_FOREACH(agg, &fqueue, ag_fiter) {
		bzero(tmpf, sizeof(tmpf));
		start = agg->ag_ostart;
		end = agg->ag_oend;
		end++;
		if (asmf)
			snprintf(tmpf, sizeof(tmpf),
			    "objdump --start-address=%p "
			    "--stop-address=%p -d %s >> %s", (void *)start,
			    (void *)end, bin, temp);
		else
			snprintf(tmpf, sizeof(tmpf),
			    "objdump --start-address=%p "
			    "--stop-address=%p -S %s >> %s", (void *)start,
			    (void *)end, bin, temp);
		if (system(tmpf) != 0)
			return (-1);
	}
	return (0);
}
static int fqueue_getall ( const char * bin , char * temp , int asmf ) { char tmpf [ MAXPATHLEN * 2 + 50 ] ; struct aggent * agg ; uintptr_t start , end ; if ( mkstemp ( temp ) == -1 ) return ( -1 ) ; TAILQ_FOREACH ( agg , & fqueue , ag_fiter ) { bzero ( tmpf , sizeof ( tmpf ) ) ; start = agg -> ag_ostart ; end = agg -> ag_oend ; end ++ ; if ( asmf ) snprintf ( tmpf , sizeof ( tmpf ) , " " " " , ( void * ) start , ( void * ) end , bin , temp ) ; else snprintf ( tmpf , sizeof ( tmpf ) , " " " " , ( void * ) start , ( void * ) end , bin , temp ) ; if ( system ( tmpf ) != 0 ) return ( -1 ) ; } return ( 0 ) ; }
Return the number of object in the first-level aggregations queue.
Return the number of object in the first - level aggregations queue .
/*
		 * Fix-up the end address in order to show it in the objdump's
		 * trace.
		 */