2 * Define the trace format that is generated by the system.
5 * Revision 1.5 1994/01/26 04:54:26 hollings
6 * Change to <module>/h/*.h
8 * Revision 1.4 1994/01/25 20:52:36 hollings
9 * changed Boolean to keep xdr happy.
11 * Revision 1.3 1993/12/13 20:10:53 hollings
12 * added ALIGN_TO_WORDSIZE macro
14 * Revision 1.2 1993/08/26 18:22:03 hollings
17 * Revision 1.1 1993/07/01 17:03:52 hollings
26 #include "rtinst/h/rtinst.h"
34 #define WORDSIZE sizeof(int)
37 #define ALIGN_TO_WORDSIZE(x) (((x) + (WORDSIZE-1)) & ~(WORDSIZE-1))
41 typedef float sampleValue;
43 #define CONTROLLER_FD 3
45 * configuration notification stream id.
48 #define CONFIG_NOTIFY_STREAM 1
50 /* header that is at the front of every trace record. */
52 time64 wall; /* wall time of the event */
53 time64 process; /* process time of the event */
54 short type; /* event type */
55 short length; /* length of event specifc data */
57 typedef struct _traceHeader traceHeader;
60 * now define each of the event specific data types.
65 * when a new process/thread is created.
70 #define TR_NEW_RESOURCE 3
71 #define TR_NEW_ASSOCIATION 4
72 #define TR_MULTI_FORK 5
74 #define TR_PTRACE_ACK 7
75 #define TR_HANDLER_READY 8
78 sampleId id; /* id of the sample */
79 sampleValue value; /* sample value */
82 typedef struct _traceSample traceSample;
85 int ppid; /* id of creating thread */
86 int pid; /* id of new thread */
87 int npids; /* number of new threads */
88 int stride; /* offset to next pid in multi */
92 /* a map from one name space to another.
94 * association = "fd-fileName";
96 * value = "/tmp/bigFile";
98 * defines the maping from file descriptior 3 to its file (/tmp/bigFile).
100 * This is used to generalize the association of values with resources.
103 struct associationEntry {
104 char association[64];
109 struct _newresource {
110 char name[255]; /* full path name of resource */
114 typedef struct _traceFork traceFork;
117 int seqNumber; /* sequence number of ptrace request */
118 int bytes_read; /* bytes which made up the ptrace request. */
119 /* We can extend the window by this much. */
122 typedef struct _ptraceAck ptraceAck;