1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)gmon.h	5.1 (Berkeley) 5/30/85
   7:  */
   8: 
   9: struct phdr {
  10:     char    *lpc;
  11:     char    *hpc;
  12:     int     ncnt;
  13: };
  14: 
  15:     /*
  16:      *	histogram counters are unsigned shorts (according to the kernel).
  17:      */
  18: #define HISTCOUNTER unsigned short
  19: 
  20:     /*
  21:      *	fraction of text space to allocate for histogram counters
  22:      *	here, 1/2
  23:      */
  24: #define HISTFRACTION    2
  25: 
  26:     /*
  27:      *	Fraction of text space to allocate for from hash buckets.
  28:      *	The value of HASHFRACTION is based on the minimum number of bytes
  29:      *	of separation between two subroutine call points in the object code.
  30:      *	Given MIN_SUBR_SEPARATION bytes of separation the value of
  31:      *	HASHFRACTION is calculated as:
  32:      *
  33:      *		HASHFRACTION = MIN_SUBR_SEPARATION / (2 * sizeof(short) - 1);
  34:      *
  35:      *	For the VAX, the shortest two call sequence is:
  36:      *
  37:      *		calls	$0,(r0)
  38:      *		calls	$0,(r0)
  39:      *
  40:      *	which is separated by only three bytes, thus HASHFRACTION is
  41:      *	calculated as:
  42:      *
  43:      *		HASHFRACTION = 3 / (2 * 2 - 1) = 1
  44:      *
  45:      *	Note that the division above rounds down, thus if MIN_SUBR_FRACTION
  46:      *	is less than three, this algorithm will not work!
  47:      */
  48: #define HASHFRACTION    1
  49: 
  50:     /*
  51:      *	percent of text space to allocate for tostructs
  52:      *	with a minimum.
  53:      */
  54: #define ARCDENSITY  2
  55: #define MINARCS     50
  56: 
  57: struct tostruct {
  58:     char        *selfpc;
  59:     long        count;
  60:     unsigned short  link;
  61: };
  62: 
  63:     /*
  64:      *	a raw arc,
  65:      *	    with pointers to the calling site and the called site
  66:      *	    and a count.
  67:      */
  68: struct rawarc {
  69:     unsigned long   raw_frompc;
  70:     unsigned long   raw_selfpc;
  71:     long        raw_count;
  72: };
  73: 
  74:     /*
  75:      *	general rounding functions.
  76:      */
  77: #define ROUNDDOWN(x,y)  (((x)/(y))*(y))
  78: #define ROUNDUP(x,y)    ((((x)+(y)-1)/(y))*(y))

Defined struct's

phdr defined in line 9; used 14 times
rawarc defined in line 68; used 2 times
tostruct defined in line 57; used 12 times

Defined macros

ARCDENSITY defined in line 54; used 1 times
HASHFRACTION defined in line 48; used 4 times
HISTCOUNTER defined in line 18; used 2 times
HISTFRACTION defined in line 24; used 3 times
MINARCS defined in line 55; used 2 times
ROUNDDOWN defined in line 77; used 1 times
ROUNDUP defined in line 78; used 1 times

Usage of this include

Last modified: 1985-05-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 774
Valid CSS Valid XHTML 1.0 Strict