Index: head/usr.sbin/pmcstat/pmcpl_gprof.c =================================================================== --- head/usr.sbin/pmcstat/pmcpl_gprof.c +++ head/usr.sbin/pmcstat/pmcpl_gprof.c @@ -468,8 +468,8 @@ image, pmcid); pgf->pgf_pmcid = pmcid; assert(image->pi_end > image->pi_start); - pgf->pgf_nbuckets = (image->pi_end - image->pi_start) / - FUNCTION_ALIGNMENT; /* see */ + pgf->pgf_nbuckets = howmany(image->pi_end - image->pi_start, + FUNCTION_ALIGNMENT); /* see */ pgf->pgf_ndatabytes = sizeof(struct gmonhdr) + pgf->pgf_nbuckets * hc_sz; pgf->pgf_nsamples = 0;