gmonhdr
struct gmonhdr gmonhdr, *hdr;
hdr = (struct gmonhdr *)&gmonhdr;
hdr->ncnt = p->kcountsize + sizeof(gmonhdr);
struct gmonhdr tmp;
fread(&tmp, sizeof(struct gmonhdr), 1, pfile);
if ( s_highpc != 0 && ( tmp.lpc != gmonhdr.lpc ||
tmp.hpc != gmonhdr.hpc || tmp.ncnt != gmonhdr.ncnt ) )
gmonhdr = tmp;
if ( gmonhdr.version == GMONVERSION ) {
rate = gmonhdr.profrate;
size = sizeof(struct gmonhdr);
gmonhdr.profrate = rate = hertz();
gmonhdr.version = GMONVERSION;
if ( gmonhdr.histcounter_type == 0 ) {
histcounter_type = gmonhdr.histcounter_type;
s_lowpc = (unsigned long) gmonhdr.lpc;
s_highpc = (unsigned long) gmonhdr.hpc;
lowpc = (unsigned long)gmonhdr.lpc / HISTORICAL_SCALE_2;
highpc = (unsigned long)gmonhdr.hpc / HISTORICAL_SCALE_2;
sampbytes = gmonhdr.ncnt - size;
gmonhdr.lpc , gmonhdr.hpc , gmonhdr.ncnt );
if ( fwrite( &gmonhdr , sizeof gmonhdr , 1 , sfile ) != 1 )
static struct gmonhdr gmonhdr;
struct gmonhdr gm;
gm.ncnt = (pgf->pgf_nbuckets * hc_sz) + sizeof(struct gmonhdr);
count = pgf->pgf_ndatabytes - sizeof(struct gmonhdr);
pgf->pgf_ndatabytes = sizeof(struct gmonhdr) +
sizeof(struct gmonhdr));
sizeof(struct gmonhdr));