Possible forms of a trace event record

An event consists of a hook word, optional data words, and a time stamp.

As shown in the following figure, a four-bit type is defined for each form that the event record can take. The type field is imposed by the recording routine so that the report facility can always skip from event to event when processing the data, even if the formatting rules in the trace format file are incorrect or missing for that event.

Figure 1. Format of a Trace Event Record. This illustration is a table containing 7 rows. Cells in the first row are labeled 12-bit hook ID, 4-bit Type and 16-bit Data Field. The next 6 rows are labeled Data Word 1 through Data Word 5, and the last row is labeled 32-bit Time Stamp. A row heading for row 1 is Hook Word (required). The next 5 rows are labeled D1 (optional), D2 (optional), D3 (optional), D4 (optional), and (optional). The last row is labeled T (required).
Format of a Trace Event Record

An event record should be as short as possible. Many system events use only the hook word and time stamp. A long format allows the user to record a variable length of data. In this long form, the 16-bit data field of the hook word is converted to a length field that describes the length of the event record.