2 * Define the trace format that is generated by the system.
5 * Revision 1.13 1995/02/16 09:12:14 markc
6 * Added support for RTfirst.o and RTend.o which mark the beginning and end
8 * Removed Boolean definition
10 * Revision 1.12 1994/07/22 19:24:00 hollings
11 * added reporting of actual pause time for CM-5
13 * Revision 1.11 1994/07/15 20:23:55 hollings
14 * made all fileds of records be 32 bits not 64 bits.
16 * Revision 1.10 1994/07/14 23:32:33 hollings
17 * added cost record type and end stats record.
19 * Revision 1.9 1994/07/11 22:29:10 jcargill
20 * Got rid of old/unused trace-record types, and added a new one for cm5 node
23 * Revision 1.8 1994/06/27 21:29:52 rbi
24 * Abstraction-specific resources and mapping info
26 * Revision 1.7 1994/03/17 14:55:49 jcargill
27 * Changed type of "Boolean" to be a char, to be consistent with X convention
28 * and to stop a type conflict with the definition in util/h/list.h
30 * Revision 1.6 1994/01/27 20:33:39 hollings
33 * Revision 1.5 1994/01/26 04:54:26 hollings
34 * Change to <module>/h/<interface>.h
36 * Revision 1.4 1994/01/25 20:52:36 hollings
37 * changed Boolean to keep xdr happy.
39 * Revision 1.3 1993/12/13 20:10:53 hollings
40 * added ALIGN_TO_WORDSIZE macro
42 * Revision 1.2 1993/08/26 18:22:03 hollings
45 * Revision 1.1 1993/07/01 17:03:52 hollings
54 #include "rtinst/h/rtinst.h"
57 * Need to make this double word since we send long longs now and then
60 #define WORDSIZE sizeof(long)
62 #define ALIGN_TO_WORDSIZE(x) (((x) + (WORDSIZE-1)) & ~(WORDSIZE-1))
64 typedef float sampleValue;
66 #define CONTROLLER_FD 3
68 * configuration notification stream id.
71 #define CONFIG_NOTIFY_STREAM 1
73 /* header that is at the front of every trace record. */
75 time64 wall; /* wall time of the event */
76 time64 process; /* process time of the event */
77 short type; /* event type */
78 short length; /* length of event specifc data */
80 typedef struct _traceHeader traceHeader;
83 * now define each of the event specific data types.
88 * when a new process/thread is created.
93 #define TR_NEW_RESOURCE 3
94 #define TR_NEW_ASSOCIATION 4
95 #define TR_MULTI_FORK 5
97 #define TR_NODE_PRINT 7
98 #define TR_COST_UPDATE 9
100 struct _traceSample {
101 sampleId id; /* id of the sample */
102 sampleValue value; /* sample value */
105 typedef struct _traceSample traceSample;
108 int ppid; /* id of creating thread */
109 int pid; /* id of new thread */
110 int npids; /* number of new threads */
111 int stride; /* offset to next pid in multi */
115 /* a map from one name space to another.
117 * type = "fd-fileName";
119 * value = "/tmp/bigFile";
121 * defines the maping from file descriptior 3 to its file (/tmp/bigFile).
123 * This is used to generalize the association of values with resources.
126 struct _association {
127 char abstraction[64];
133 struct _newresource {
134 char name[255]; /* full path name of resource */
135 char abstraction[64]; /* name of abstraction */
138 typedef struct _traceFork traceFork;
141 int seqNumber; /* sequence number of ptrace request */
142 int bytes_read; /* bytes which made up the ptrace request. */
143 /* We can extend the window by this much. */
146 typedef struct _ptraceAck ptraceAck;
149 int slotsExecuted; /* number of base tramps halves called. */
150 float observedCost; /* # of cycles of observed cost */
151 float pauseTime; /* total pause time this interval */
154 typedef struct _costUpdate costUpdate;