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