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

Defined variables

cnt defined in line 49; never used
dmon defined in line 94; used 1 times
pgintime defined in line 109; never used
pmon defined in line 98; never used
pmonmin defined in line 103; never used
pres defined in line 104; never used
rate defined in line 49; never used
rectime defined in line 108; never used
rmon defined in line 101; never used
rmonmin defined in line 105; never used
rres defined in line 106; never used
smon defined in line 95; used 1 times
sum defined in line 49; never used
total defined in line 71; never used

Defined struct's

vmmeter defined in line 12; used 6 times
vmtotal defined in line 53; used 2 times
  • in line 71(2)

Defined macros

DRES defined in line 82; used 2 times
NDMON defined in line 79; used 3 times
NPMON defined in line 87; used 1 times
  • in line 98
NRMON defined in line 91; used 1 times
NSMON defined in line 80; used 3 times
PMONMIN defined in line 85; used 1 times
PRES defined in line 86; used 1 times
RMONMIN defined in line 89; used 1 times
RRES defined in line 90; used 1 times
SRES defined in line 83; used 2 times
v_first defined in line 14; never used
v_last defined in line 44; never used

Usage of this include

Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 909
Valid CSS Valid XHTML 1.0 Strict