|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1982, 1986 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: * @(#)vmmeter.h 7.1 (Berkeley) 6/4/86 ! 7: */ ! 8: ! 9: /* ! 10: * Virtual memory related instrumentation ! 11: */ ! 12: struct vmmeter ! 13: { ! 14: #define v_first v_swtch ! 15: unsigned v_swtch; /* context switches */ ! 16: unsigned v_trap; /* calls to trap */ ! 17: unsigned v_syscall; /* calls to syscall() */ ! 18: unsigned v_intr; /* device interrupts */ ! 19: unsigned v_soft; /* software interrupts */ ! 20: unsigned v_pdma; /* pseudo-dma interrupts */ ! 21: unsigned v_pswpin; /* pages swapped in */ ! 22: unsigned v_pswpout; /* pages swapped out */ ! 23: unsigned v_pgin; /* pageins */ ! 24: unsigned v_pgout; /* pageouts */ ! 25: unsigned v_pgpgin; /* pages paged in */ ! 26: unsigned v_pgpgout; /* pages paged out */ ! 27: unsigned v_intrans; /* intransit blocking page faults */ ! 28: unsigned v_pgrec; /* total page reclaims */ ! 29: unsigned v_xsfrec; /* found in free list rather than on swapdev */ ! 30: unsigned v_xifrec; /* found in free list rather than in filsys */ ! 31: unsigned v_exfod; /* pages filled on demand from executables */ ! 32: unsigned v_zfod; /* pages zero filled on demand */ ! 33: unsigned v_vrfod; /* fills of pages mapped by vread() */ ! 34: unsigned v_nexfod; /* number of exfod's created */ ! 35: unsigned v_nzfod; /* number of zfod's created */ ! 36: unsigned v_nvrfod; /* number of vrfod's created */ ! 37: unsigned v_pgfrec; /* page reclaims from free list */ ! 38: unsigned v_faults; /* total faults taken */ ! 39: unsigned v_scan; /* scans in page out daemon */ ! 40: unsigned v_rev; /* revolutions of the hand */ ! 41: unsigned v_seqfree; /* pages taken from sequential programs */ ! 42: unsigned v_dfree; /* pages freed by daemon */ ! 43: unsigned v_fastpgrec; /* fast reclaims in locore */ ! 44: #define v_last v_fastpgrec ! 45: unsigned v_swpin; /* swapins */ ! 46: unsigned v_swpout; /* swapouts */ ! 47: }; ! 48: #ifdef KERNEL ! 49: struct vmmeter cnt, rate, sum; ! 50: #endif ! 51: ! 52: /* systemwide totals computed every five seconds */ ! 53: struct vmtotal ! 54: { ! 55: short t_rq; /* length of the run queue */ ! 56: short t_dw; /* jobs in ``disk wait'' (neg priority) */ ! 57: short t_pw; /* jobs in page wait */ ! 58: short t_sl; /* jobs sleeping in core */ ! 59: short t_sw; /* swapped out runnable/short block jobs */ ! 60: long t_vm; /* total virtual memory */ ! 61: long t_avm; /* active virtual memory */ ! 62: long t_rm; /* total real memory in use */ ! 63: long t_arm; /* active real memory */ ! 64: long t_vmtxt; /* virtual memory used by text */ ! 65: long t_avmtxt; /* active virtual memory used by text */ ! 66: long t_rmtxt; /* real memory used by text */ ! 67: long t_armtxt; /* active real memory used by text */ ! 68: long t_free; /* free memory pages */ ! 69: }; ! 70: #ifdef KERNEL ! 71: struct vmtotal total; ! 72: #endif ! 73: ! 74: /* ! 75: * Optional instrumentation. ! 76: */ ! 77: #ifdef PGINPROF ! 78: ! 79: #define NDMON 128 ! 80: #define NSMON 128 ! 81: ! 82: #define DRES 20 ! 83: #define SRES 5 ! 84: ! 85: #define PMONMIN 20 ! 86: #define PRES 50 ! 87: #define NPMON 64 ! 88: ! 89: #define RMONMIN 130 ! 90: #define RRES 5 ! 91: #define NRMON 64 ! 92: ! 93: /* data and stack size distribution counters */ ! 94: unsigned int dmon[NDMON+1]; ! 95: unsigned int smon[NSMON+1]; ! 96: ! 97: /* page in time distribution counters */ ! 98: unsigned int pmon[NPMON+2]; ! 99: ! 100: /* reclaim time distribution counters */ ! 101: unsigned int rmon[NRMON+2]; ! 102: ! 103: int pmonmin; ! 104: int pres; ! 105: int rmonmin; ! 106: int rres; ! 107: ! 108: unsigned rectime; /* accumulator for reclaim times */ ! 109: unsigned pgintime; /* accumulator for page in times */ ! 110: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.