|
|
1.1 ! root 1: /* ! 2: * Memory allocator trace points; all trace the amount of memory involved ! 3: */ ! 4: #define TR_MALL 10 /* memory allocated */ ! 5: ! 6: /* ! 7: * Paging trace points: all are <vaddr, pid> ! 8: */ ! 9: #define TR_INTRANS 20 /* page intransit block */ ! 10: #define TR_EINTRANS 21 /* page intransit wait done */ ! 11: #define TR_FRECLAIM 22 /* reclaim from free list */ ! 12: #define TR_RECLAIM 23 /* reclaim from loop */ ! 13: #define TR_XSFREC 24 /* reclaim from free list instead of drum */ ! 14: #define TR_XIFREC 25 /* reclaim from free list instead of fsys */ ! 15: #define TR_WAITMEM 26 /* wait for memory in pagein */ ! 16: #define TR_EWAITMEM 27 /* end memory wait in pagein */ ! 17: #define TR_ZFOD 28 /* zfod page fault */ ! 18: #define TR_EXFOD 29 /* exec fod page fault */ ! 19: #define TR_VRFOD 30 /* vread fod page fault */ ! 20: #define TR_CACHEFOD 31 /* fod in file system cache */ ! 21: #define TR_SWAPIN 32 /* drum page fault */ ! 22: #define TR_PGINDONE 33 /* page in done */ ! 23: ! 24: /* ! 25: * System call trace points. ! 26: */ ! 27: #define TR_VADVISE 40 /* vadvise occurred with <arg, pid> */ ! 28: ! 29: /* iget tracing */ ! 30: #define TR_IGET 1 ! 31: #define TR_IGOT 2 ! 32: #define TR_SEND 3 ! 33: #define TR_RECV 4 ! 34: ! 35: /* ! 36: * up/uda interrupt tracking ! 37: */ ! 38: #define TR_UBGO 10 /* disk command */ ! 39: #define TR_UBINT 11 /* got interrupt */ ! 40: #define TR_BFIN 12 /* in bflush from update */ ! 41: #define TR_BFOUT 13 /* out of bflush from update */ ! 42: #define TR_BDPON 14 /* alloc bdp */ ! 43: #define TR_BDPOFF 15 /* de-alloc bdp */ ! 44: #define TR_UDCMND 16 /* sent a command to the uda-50 */ ! 45: #define TR_UDRESP 17 /* uda 50 interrupted */ ! 46: ! 47: /* ! 48: * Miscellaneous ! 49: */ ! 50: #define TR_STAMP 50 /* user said vtrace(VTR_STAMP, value); */ ! 51: ! 52: /* ! 53: * This defines the size of the trace flags array. ! 54: */ ! 55: #define TR_NFLAGS 100 /* generous */ ! 56: ! 57: #define TRCSIZ 4096 ! 58: ! 59: /* ! 60: * Specifications of the vtrace() system call, which takes one argument. ! 61: */ ! 62: #define VTRACE 64+51 ! 63: ! 64: #define VTR_DISABLE 0 /* set a trace flag to 0 */ ! 65: #define VTR_ENABLE 1 /* set a trace flag to 1 */ ! 66: #define VTR_VALUE 2 /* return value of a trace flag */ ! 67: #define VTR_UALARM 3 /* set alarm to go off (sig 16) */ ! 68: /* in specified number of hz */ ! 69: #define VTR_STAMP 4 /* user specified stamp */ ! 70: #ifdef TRACE ! 71: #ifdef KERNEL ! 72: char traceflags[TR_NFLAGS]; ! 73: struct proc *traceproc; ! 74: int tracebuf[TRCSIZ]; ! 75: unsigned tracex; ! 76: int tracewhich; ! 77: #define trace(a,b,c) if (traceflags[a]) trace1(a,b,c) ! 78: #endif ! 79: #else ! 80: #define trace(a, b, c) ! 81: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.