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:  * Slipped into 2.10 in about 15 minutes.  Bears only a casual
  13:  * relationship to the 4.X code, we just used the same names so
  14:  * someone could do it right if they felt like it.  Note that
  15:  * the #defines aren't even sequentially numbered.
  16:  */
  17: #define TR_BREADHIT 0   /* buffer read found in cache */
  18: #define TR_BREADMISS    1   /* buffer read not in cache */
  19: #define TR_BWRITE   2   /* buffer written */
  20: #define TR_BREADHITRA   3   /* buffer read-ahead found in cache */
  21: #define TR_BREADMISSRA  4   /* buffer read-ahead not in cache */
  22: #define TR_BRELSE   5   /* brelse */
  23: #define TR_SWAPIO   6   /* swap i/o request arrives */
  24: #define TR_NUM_210  7   /* size of array for 2.10BSD
  25: 
  26: #define	TR_XFODMISS	5	/* exe fod read */
  27: #define TR_XFODHIT  6   /* exe fod read */
  28: #define TR_BREALLOC 8   /* expand/contract a buffer */
  29: 
  30: /*
  31:  * Memory allocator trace points; all trace the amount of memory involved
  32:  */
  33: #define TR_MALL     10  /* memory allocated */
  34: 
  35: /*
  36:  * Paging trace points: all are <vaddr, pid>
  37:  */
  38: #define TR_INTRANS  20  /* page intransit block */
  39: #define TR_EINTRANS 21  /* page intransit wait done */
  40: #define TR_FRECLAIM 22  /* reclaim from free list */
  41: #define TR_RECLAIM  23  /* reclaim from loop */
  42: #define TR_XSFREC   24  /* reclaim from free list instead of drum */
  43: #define TR_XIFREC   25  /* reclaim from free list instead of fsys */
  44: #define TR_WAITMEM  26  /* wait for memory in pagein */
  45: #define TR_EWAITMEM 27  /* end memory wait in pagein */
  46: #define TR_ZFOD     28  /* zfod page fault */
  47: #define TR_EXFOD    29  /* exec fod page fault */
  48: #define TR_VRFOD    30  /* vread fod page fault */
  49: #define TR_CACHEFOD 31  /* fod in file system cache */
  50: #define TR_SWAPIN   32  /* drum page fault */
  51: #define TR_PGINDONE 33  /* page in done */
  52: 
  53: /*
  54:  * System call trace points.
  55:  */
  56: #define TR_VADVISE  40  /* vadvise occurred with <arg, pid> */
  57: 
  58: /*
  59:  * Miscellaneous
  60:  */
  61: #define TR_STAMP    45  /* user said vtrace(VTR_STAMP, value); */
  62: 
  63: /*
  64:  * This defines the size of the trace flags array.
  65:  */
  66: #define TR_NFLAGS   100 /* generous */
  67: 
  68: #define TRCSIZ      4096
  69: 
  70: /*
  71:  * Specifications of the vtrace() system call, which takes one argument.
  72:  */
  73: #define VTRACE      64+51
  74: 
  75: #define VTR_DISABLE 0       /* set a trace flag to 0 */
  76: #define VTR_ENABLE  1       /* set a trace flag to 1 */
  77: #define VTR_VALUE   2       /* return value of a trace flag */
  78: #define VTR_UALARM  3       /* set alarm to go off (sig 16) */
  79:                     /* in specified number of hz */
  80: #define VTR_STAMP   4       /* user specified stamp */
  81: 
  82: #if defined(KERNEL) && defined(UCB_METER) && !defined(SUPERVISOR)
  83: u_long tracebuf[TR_NUM_210];
  84: #define trace(a)    tracebuf[a]++;
  85: #else
  86: #define trace(a)    ;
  87: #endif

Defined macros

TRCSIZ defined in line 68; never used
TR_BREADHIT defined in line 17; used 5 times
TR_BREADHITRA defined in line 20; used 3 times
TR_BREADMISS defined in line 18; used 4 times
TR_BREADMISSRA defined in line 21; used 2 times
TR_BREALLOC defined in line 28; never used
TR_BRELSE defined in line 22; used 3 times
TR_BWRITE defined in line 19; used 2 times
TR_CACHEFOD defined in line 49; never used
TR_EINTRANS defined in line 39; never used
TR_EWAITMEM defined in line 45; never used
TR_EXFOD defined in line 47; never used
TR_FRECLAIM defined in line 40; never used
TR_INTRANS defined in line 38; never used
TR_MALL defined in line 33; never used
TR_NFLAGS defined in line 66; never used
TR_NUM_210 defined in line 24; used 2 times
TR_PGINDONE defined in line 51; never used
TR_RECLAIM defined in line 41; never used
TR_STAMP defined in line 61; never used
TR_SWAPIN defined in line 50; never used
TR_SWAPIO defined in line 23; used 1 times
TR_VADVISE defined in line 56; never used
TR_VRFOD defined in line 48; never used
TR_WAITMEM defined in line 44; never used
TR_XFODHIT defined in line 27; never used
TR_XIFREC defined in line 43; never used
TR_XSFREC defined in line 42; never used
TR_ZFOD defined in line 46; never used
VTRACE defined in line 73; never used
VTR_DISABLE defined in line 75; never used
VTR_ENABLE defined in line 76; never used
VTR_STAMP defined in line 80; never used
VTR_UALARM defined in line 78; never used
VTR_VALUE defined in line 77; never used
trace defined in line 86; used 11 times

Usage of this include

Last modified: 1988-01-28
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1167
Valid CSS Valid XHTML 1.0 Strict