|
|
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.2 (Berkeley) 10/13/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: #ifdef tahoe
45: unsigned v_fpe; /* floating point emulation traps */
46: unsigned v_align; /* alignment emulation traps */
47: #endif
48: #define v_last v_fastpgrec
49: unsigned v_swpin; /* swapins */
50: unsigned v_swpout; /* swapouts */
51: };
52: #ifdef KERNEL
53: struct vmmeter cnt, rate, sum;
54: #endif
55:
56: /* systemwide totals computed every five seconds */
57: struct vmtotal
58: {
59: short t_rq; /* length of the run queue */
60: short t_dw; /* jobs in ``disk wait'' (neg priority) */
61: short t_pw; /* jobs in page wait */
62: short t_sl; /* jobs sleeping in core */
63: short t_sw; /* swapped out runnable/short block jobs */
64: long t_vm; /* total virtual memory */
65: long t_avm; /* active virtual memory */
66: long t_rm; /* total real memory in use */
67: long t_arm; /* active real memory */
68: long t_vmtxt; /* virtual memory used by text */
69: long t_avmtxt; /* active virtual memory used by text */
70: long t_rmtxt; /* real memory used by text */
71: long t_armtxt; /* active real memory used by text */
72: long t_free; /* free memory pages */
73: };
74: #ifdef KERNEL
75: struct vmtotal total;
76: #endif
77:
78: /*
79: * Optional instrumentation.
80: */
81: #ifdef PGINPROF
82:
83: #define NDMON 128
84: #define NSMON 128
85:
86: #define DRES 20
87: #define SRES 5
88:
89: #define PMONMIN 20
90: #define PRES 50
91: #define NPMON 64
92:
93: #define RMONMIN 130
94: #define RRES 5
95: #define NRMON 64
96:
97: /* data and stack size distribution counters */
98: unsigned int dmon[NDMON+1];
99: unsigned int smon[NSMON+1];
100:
101: /* page in time distribution counters */
102: unsigned int pmon[NPMON+2];
103:
104: /* reclaim time distribution counters */
105: unsigned int rmon[NRMON+2];
106:
107: int pmonmin;
108: int pres;
109: int rmonmin;
110: int rres;
111:
112: unsigned rectime; /* accumulator for reclaim times */
113: unsigned pgintime; /* accumulator for page in times */
114: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.