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:  *	@(#)trace.h	7.1 (Berkeley) 6/4/86
   7:  */
   8: 
   9: /*
  10:  * File system buffer tracing points; all trace <pack(dev, size), bn>
  11:  */
  12: #define TR_BREADHIT 0   /* buffer read found in cache */
  13: #define TR_BREADMISS    1   /* buffer read not in cache */
  14: #define TR_BWRITE   2   /* buffer written */
  15: #define TR_BREADHITRA   3   /* buffer read-ahead found in cache */
  16: #define TR_BREADMISSRA  4   /* buffer read-ahead not in cache */
  17: #define TR_XFODMISS 5   /* exe fod read */
  18: #define TR_XFODHIT  6   /* exe fod read */
  19: #define TR_BRELSE   7   /* brelse */
  20: #define TR_BREALLOC 8   /* expand/contract a buffer */
  21: 
  22: /*
  23:  * Memory allocator trace points; all trace the amount of memory involved
  24:  */
  25: #define TR_MALL     10  /* memory allocated */
  26: 
  27: /*
  28:  * Paging trace points: all are <vaddr, pid>
  29:  */
  30: #define TR_INTRANS  20  /* page intransit block */
  31: #define TR_EINTRANS 21  /* page intransit wait done */
  32: #define TR_FRECLAIM 22  /* reclaim from free list */
  33: #define TR_RECLAIM  23  /* reclaim from loop */
  34: #define TR_XSFREC   24  /* reclaim from free list instead of drum */
  35: #define TR_XIFREC   25  /* reclaim from free list instead of fsys */
  36: #define TR_WAITMEM  26  /* wait for memory in pagein */
  37: #define TR_EWAITMEM 27  /* end memory wait in pagein */
  38: #define TR_ZFOD     28  /* zfod page fault */
  39: #define TR_EXFOD    29  /* exec fod page fault */
  40: #define TR_VRFOD    30  /* vread fod page fault */
  41: #define TR_CACHEFOD 31  /* fod in file system cache */
  42: #define TR_SWAPIN   32  /* drum page fault */
  43: #define TR_PGINDONE 33  /* page in done */
  44: #define TR_SWAPIO   34  /* swap i/o request arrives */
  45: 
  46: /*
  47:  * System call trace points.
  48:  */
  49: #define TR_VADVISE  40  /* vadvise occurred with <arg, pid> */
  50: 
  51: /*
  52:  * Miscellaneous
  53:  */
  54: #define TR_STAMP    45  /* user said vtrace(VTR_STAMP, value); */
  55: 
  56: /*
  57:  * This defines the size of the trace flags array.
  58:  */
  59: #define TR_NFLAGS   100 /* generous */
  60: 
  61: #define TRCSIZ      4096
  62: 
  63: /*
  64:  * Specifications of the vtrace() system call, which takes one argument.
  65:  */
  66: #define VTRACE      64+51
  67: 
  68: #define VTR_DISABLE 0       /* set a trace flag to 0 */
  69: #define VTR_ENABLE  1       /* set a trace flag to 1 */
  70: #define VTR_VALUE   2       /* return value of a trace flag */
  71: #define VTR_UALARM  3       /* set alarm to go off (sig 16) */
  72:                     /* in specified number of hz */
  73: #define VTR_STAMP   4       /* user specified stamp */
  74: #ifdef KERNEL
  75: #ifdef TRACE
  76: char    traceflags[TR_NFLAGS];
  77: struct  proc *traceproc;
  78: int tracebuf[TRCSIZ];
  79: unsigned tracex;
  80: int tracewhich;
  81: #define pack(a,b)   ((a)<<16)|(b)
  82: #define trace(a,b,c)    if (traceflags[a]) trace1(a,b,c)
  83: #else
  84: #define trace(a,b,b)    ;
  85: #endif
  86: #endif

Defined variables

tracebuf defined in line 78; used 1 times
traceflags defined in line 76; used 4 times
traceproc defined in line 77; never used
tracewhich defined in line 80; never used
tracex defined in line 79; used 3 times

Defined macros

TRCSIZ defined in line 61; used 4 times
TR_BREADHIT defined in line 12; used 2 times
TR_BREADHITRA defined in line 15; used 1 times
TR_BREADMISS defined in line 13; used 2 times
TR_BREADMISSRA defined in line 16; used 1 times
TR_BREALLOC defined in line 20; used 1 times
TR_BRELSE defined in line 19; used 2 times
TR_BWRITE defined in line 14; used 1 times
TR_CACHEFOD defined in line 41; never used
TR_EINTRANS defined in line 31; used 1 times
TR_EWAITMEM defined in line 37; used 1 times
TR_EXFOD defined in line 39; used 1 times
TR_FRECLAIM defined in line 32; used 1 times
TR_INTRANS defined in line 30; used 1 times
TR_MALL defined in line 25; used 1 times
TR_NFLAGS defined in line 59; used 3 times
TR_PGINDONE defined in line 43; used 1 times
TR_RECLAIM defined in line 33; used 1 times
TR_STAMP defined in line 54; used 1 times
TR_SWAPIN defined in line 42; used 1 times
TR_SWAPIO defined in line 44; used 1 times
TR_VADVISE defined in line 49; used 1 times
TR_VRFOD defined in line 40; never used
TR_WAITMEM defined in line 36; used 1 times
TR_XFODHIT defined in line 18; never used
TR_XFODMISS defined in line 17; used 1 times
TR_XIFREC defined in line 35; used 1 times
TR_XSFREC defined in line 34; used 1 times
TR_ZFOD defined in line 38; used 1 times
VTRACE defined in line 66; never used
VTR_DISABLE defined in line 68; never used
VTR_ENABLE defined in line 69; never used
VTR_STAMP defined in line 73; never used
VTR_UALARM defined in line 71; never used
VTR_VALUE defined in line 70; never used
pack defined in line 81; used 10 times

Usage of this include

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