Annotation of researchv9/sys/h/vmmeter.h, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.