STRACE uses software trace hooks to collect data. Trace hooks are identified by both a major code and a minor code. Major code 1 is reserved for exclusive use by IBM. Major codes 0x00b8 (184) and 0x00b9 (185) have been reserved for customer use. A listing of major and minor codes associated with OS/2 Warp Server for SMP can be found in System Trace Hook Definitions.
For major codes other than 0x00b8 and 0x00b9 mentioned above, the user identifies the major codes to be traced with the TRACE command.
To turn tracing on for events with major codes of 0x0002, 0x0013, and 0x0042:
TRACE ON 2 19 66
Note: The TRACE command requires decimal arguments.
If TRACE ON is specified without one or more major codes, tracing for all major codes, except 1, is enabled.
STRACE.EXE uses the general purpose performance function DosPerfSysCall to access the software trace buffer. When STRACE is turned on, it allocates the required buffers (one per processor) in the kernel space and starts tracing immediately. A user may turn off STRACE (to stop collecting trace data), copy the buffers to the user's buffer, flush the buffer to restart tracing, or reset STRACE (turn off and free the allocated buffers).