home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilss / sockets / include / sys / h / trace < prev    next >
Encoding:
Text File  |  1995-01-11  |  3.0 KB  |  104 lines

  1. /*
  2.  * $Header: /ax/networking:include/sys/trace.h:networking  1.1  $
  3.  * $Source: /ax/networking:include/sys/trace.h: $
  4.  *
  5.  * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
  6.  *
  7.  * $Log:    trace.h,v $
  8.  * Revision 1.1  95/01/11  10:20:02  kwelton
  9.  * Initial revision
  10.  * 
  11.  * Revision 1.3  88/06/17  20:22:01  beta
  12.  * Acorn Unix initial beta version
  13.  * 
  14.  */
  15. /* @(#)trace.h    1.2 87/05/15 3.2/4.3NFSSRC */
  16. /*
  17.  * Copyright (c) 1982, 1986 Regents of the University of California.
  18.  * All rights reserved.  The Berkeley software License Agreement
  19.  * specifies the terms and conditions for redistribution.
  20.  *
  21.  *    @(#)trace.h    7.1 (Berkeley) 6/4/86
  22.  */
  23.  
  24. /*
  25.  * File system buffer tracing points; all trace <pack(dev, size), bn>
  26.  */
  27. #define    TR_BREADHIT    0    /* buffer read found in cache */
  28. #define    TR_BREADMISS    1    /* buffer read not in cache */
  29. #define    TR_BWRITE    2    /* buffer written */
  30. #define    TR_BREADHITRA    3    /* buffer read-ahead found in cache */
  31. #define    TR_BREADMISSRA    4    /* buffer read-ahead not in cache */
  32. #define    TR_XFODMISS    5    /* exe fod read */
  33. #define    TR_XFODHIT    6    /* exe fod read */
  34. #define    TR_BRELSE    7    /* brelse */
  35. #define    TR_BREALLOC    8    /* expand/contract a buffer */
  36.  
  37. /*
  38.  * Memory allocator trace points; all trace the amount of memory involved
  39.  */
  40. #define    TR_MALL        10    /* memory allocated */
  41.  
  42. /*
  43.  * Paging trace points: all are <vaddr, pid>
  44.  */
  45. #define    TR_INTRANS    20    /* page intransit block */
  46. #define    TR_EINTRANS    21    /* page intransit wait done */
  47. #define    TR_FRECLAIM    22    /* reclaim from free list */
  48. #define    TR_RECLAIM    23    /* reclaim from loop */
  49. #define    TR_XSFREC    24    /* reclaim from free list instead of drum */
  50. #define    TR_XIFREC    25    /* reclaim from free list instead of fsys */
  51. #define    TR_WAITMEM    26    /* wait for memory in pagein */
  52. #define    TR_EWAITMEM    27    /* end memory wait in pagein */
  53. #define    TR_ZFOD        28    /* zfod page fault */
  54. #define    TR_EXFOD    29    /* exec fod page fault */
  55. #define    TR_VRFOD    30    /* vread fod page fault */
  56. #define    TR_CACHEFOD    31    /* fod in file system cache */
  57. #define    TR_SWAPIN    32    /* drum page fault */
  58. #define    TR_PGINDONE    33    /* page in done */
  59. #define    TR_SWAPIO    34    /* swap i/o request arrives */
  60.  
  61. /*
  62.  * System call trace points.
  63.  */
  64. #define    TR_VADVISE    40    /* vadvise occurred with <arg, pid> */
  65.  
  66. /*
  67.  * Miscellaneous
  68.  */
  69. #define    TR_STAMP    45    /* user said vtrace(VTR_STAMP, value); */
  70.  
  71. /*
  72.  * This defines the size of the trace flags array.
  73.  */
  74. #define    TR_NFLAGS    100    /* generous */
  75.  
  76. #define    TRCSIZ        4096
  77.  
  78. /*
  79.  * Specifications of the vtrace() system call, which takes one argument.
  80.  */
  81. #define    VTRACE        64+51
  82.  
  83. #define    VTR_DISABLE    0        /* set a trace flag to 0 */
  84. #define    VTR_ENABLE    1        /* set a trace flag to 1 */
  85. #define    VTR_VALUE    2        /* return value of a trace flag */
  86. #define    VTR_UALARM    3        /* set alarm to go off (sig 16) */
  87.                     /* in specified number of hz */
  88. #define    VTR_STAMP    4        /* user specified stamp */
  89. #ifdef KERNEL
  90. #ifdef TRACE
  91. char    traceflags[TR_NFLAGS];
  92. struct    proc *traceproc;
  93. int    tracebuf[TRCSIZ];
  94. unsigned tracex;
  95. int    tracewhich;
  96. #define    pack(a,b)    ((a)<<16)|(b)
  97. #define    trace(a,b,c)    if (traceflags[a]) trace1(a,b,c)
  98. #else
  99. #define    trace(a,b,b)    ;
  100. #endif
  101. #endif
  102.  
  103. /* EOF trace.h */
  104.