|
|
1.1 ! root 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))
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.