next up previous contents index
Next: dtTrace Up: Operations Previous: Operations

dtCreateTraceObj

   

Creates and initializes a trace object with name traceName. The traceName and instName fields are also used to create the name of the trace output file. If instName is NULL, the output file is `` traceName.dt''; otherwise, it is ``

traceName_instName.dt'' (substituting the appropriate values for the variable names).

The logsize parameter specifies the size of the trace buffer in bytes, and fileSize states the maximum length of the trace file in terms of trace buffers (e.g., logsize = 10000 and

fileSize = 3 means a trace buffer of approximately 10KB and a maximum trace file size of 30KB).

dt *dtCreateTraceObj(char *traceName, char *instName, int logsize, int fileSize)

Note that both the trace buffer and trace file are circular. When the trace buffer is full, it will be flushed to disk; when the trace file is full, the next trace buffer written will overwrite the first one in the file.

A list of all trace objects created by any protocol is maintained by the datatrace tool. The newly created trace object is put at the end of this list.



Larry Peterson
Wed Jan 10 10:40:08 MST 1996