gmonhdr
p->outbuflen = sizeof(struct gmonhdr) + p->kcountsize +
p->kcount = (void *)(a + sizeof(struct gmonhdr));
p->rawarcs = (void *)(a + sizeof(struct gmonhdr) + p->kcountsize);
struct gmonhdr *hdr;
hdr = (struct gmonhdr *)p->outbuf;
upp->pr_base = (caddr_t)SCARG(uap, buf) + sizeof(struct gmonhdr);
struct gmonhdr hdr;
struct gmonhdr tmp;
if (fread(&tmp, sizeof(struct gmonhdr), 1, pfile) != 1)
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;
s_lowpc = (unsigned long) gmonhdr.lpc;
s_highpc = (unsigned long) gmonhdr.hpc;
lowpc = (unsigned long)gmonhdr.lpc / sizeof(UNIT);
highpc = (unsigned long)gmonhdr.hpc / sizeof(UNIT);
sampbytes = gmonhdr.ncnt - size;
gmonhdr.lpc , gmonhdr.hpc , gmonhdr.ncnt );
if ( fwrite( &gmonhdr , sizeof gmonhdr , 1 , sfile ) != 1 )
static struct gmonhdr gmonhdr;
struct gmonhdr h;