#include <sys/trace.h>

sys/trace.h

includes: sys/appleapiopts.h
35 macros

macroTR_BREADHIT

File system buffer tracing points; all trace <pack(dev, size), bn>
#define TR_BREADHIT 0
buffer read found in cache

macroTR_BREADMISS

#define TR_BREADMISS 1
buffer read not in cache

macroTR_BWRITE

#define TR_BWRITE 2
buffer written

macroTR_BREADHITRA

#define TR_BREADHITRA 3
buffer read-ahead found in cache

macroTR_BREADMISSRA

#define TR_BREADMISSRA 4
buffer read-ahead not in cache

macroTR_XFODMISS

#define TR_XFODMISS 5
exe fod read

macroTR_XFODHIT

#define TR_XFODHIT 6
exe fod read

macroTR_BRELSE

#define TR_BRELSE 7
brelse

macroTR_BREALLOC

#define TR_BREALLOC 8
expand/contract a buffer

macroTR_MALL

Memory allocator trace points; all trace the amount of memory involved
#define TR_MALL 10
memory allocated

macroTR_INTRANS

Paging trace points: all are <vaddr, pid>
#define TR_INTRANS 20
page intransit block

macroTR_EINTRANS

#define TR_EINTRANS 21
page intransit wait done

macroTR_FRECLAIM

#define TR_FRECLAIM 22
reclaim from free list

macroTR_RECLAIM

#define TR_RECLAIM 23
reclaim from loop

macroTR_XSFREC

#define TR_XSFREC 24
reclaim from free list instead of drum

macroTR_XIFREC

#define TR_XIFREC 25
reclaim from free list instead of fsys

macroTR_WAITMEM

#define TR_WAITMEM 26
wait for memory in pagein

macroTR_EWAITMEM

#define TR_EWAITMEM 27
end memory wait in pagein

macroTR_ZFOD

#define TR_ZFOD 28
zfod page fault

macroTR_EXFOD

#define TR_EXFOD 29
exec fod page fault

macroTR_VRFOD

#define TR_VRFOD 30
vread fod page fault

macroTR_CACHEFOD

#define TR_CACHEFOD 31
fod in file system cache

macroTR_SWAPIN

#define TR_SWAPIN 32
drum page fault

macroTR_PGINDONE

#define TR_PGINDONE 33
page in done

macroTR_SWAPIO

#define TR_SWAPIO 34
swap i/o request arrives

macroTR_VADVISE

System call trace points.
#define TR_VADVISE 40
vadvise occurred with <arg, pid>

macroTR_STAMP

Miscellaneous
#define TR_STAMP 45
user said vtrace(VTR_STAMP, value);

macroTR_NFLAGS

This defines the size of the trace flags array.
#define TR_NFLAGS 100
generous

macroTRCSIZ

#define TRCSIZ 4096

macroVTRACE

Specifications of the vtrace() system call, which takes one argument.
#define VTRACE 64+51

macroVTR_DISABLE

#define VTR_DISABLE 0
set a trace flag to 0

macroVTR_ENABLE

#define VTR_ENABLE 1
set a trace flag to 1

macroVTR_VALUE

#define VTR_VALUE 2
return value of a trace flag

macroVTR_UALARM

#define VTR_UALARM 3
set alarm to go off (sig 16)

macroVTR_STAMP

in specified number of hz
#define VTR_STAMP 4
user specified stamp