FreeBSD/usr.sbin/pmcstat/pmcpl_gprof.c
/*
 * Determine the full pathname of a gmon.out file for a given
 * (image,pmcid) combination.  Return the interned string.
 */
Determine the full pathname of a gmon.out file for a given
(image,pmcid) combination.  Return the interned string.
Determine the full pathname of a gmon . out file for a given ( image pmcid ) combination . Return the interned string .
pmcstat_interned_string
pmcstat_gmon_create_name(const char *samplesdir, struct pmcstat_image *image,
    pmc_id_t pmcid)
{
	const char *pmcname;
	char fullpath[PATH_MAX];
	pmcname = pmcstat_pmcid_to_name(pmcid);
	if (!pmcname)
		err(EX_SOFTWARE, "ERROR: cannot find pmcid");
	(void) snprintf(fullpath, sizeof(fullpath),
	    "%s/%s/%s", samplesdir, pmcname,
	    pmcstat_string_unintern(image->pi_samplename));
	return (pmcstat_string_intern(fullpath));
}
pmcstat_interned_string pmcstat_gmon_create_name ( const char * samplesdir , struct pmcstat_image * image , pmc_id_t pmcid ) { const char * pmcname ; char fullpath [ PATH_MAX ] ; pmcname = pmcstat_pmcid_to_name ( pmcid ) ; if ( ! pmcname ) err ( EX_SOFTWARE , " " ) ; ( void ) snprintf ( fullpath , sizeof ( fullpath ) , " " , samplesdir , pmcname , pmcstat_string_unintern ( image -> pi_samplename ) ) ; return ( pmcstat_string_intern ( fullpath ) ) ; }
Determine the full pathname of a gmon.out file for a given
 (image,pmcid) combination.
Determine the full pathname of a gmon . out file for a given ( image pmcid ) combination .