Download IBM RT PC Virtual Resource Manager Programming Reference

Transcript
The _trcvrm subroutine fills in the following fields required by the trace entry
header:
Date and Time
This value is obtained from the _toy variable.
Time Extension
This value is obtained from the _toyx variable.
VRM Sequence Number
The VRM sequence number is the value of a counter incremented
by the VRM trace collector each time it receives a trace entry. This
value is used to sort the sequence of VRM trace events within a time
interval.
VM Sequence Number
The virtual machine sequence number is the value of a counter
incremented by the virtual machine trace collector each time it
receives a trace entry. This value is used to sort the sequence of virtual
machine trace events within a time interval.
Process ID
This value is obtained from the _curid variable.
The rest of the information required for the trace entry is obtained from the
subroutine call and from the DDS of the device driver or component that performs the
subroutine call.
If the trace data passed to the subroutine is in memory, then that data is placed in
the trace entry. If the trace data is not in memory, the data bytes in the trace entry
are set to 0xFFFF.
Subroutine Call:
Return Code = _trcvrm(trace ID, trace data, trace length)
Calling Register Conventions:
GPR2 = The two-byte trace ID of the component generating the trace entry
subroutine call. The first five bits contain the channel number and the
remaining eleven bits contain the hook ID number. For user-defined trace
entries, the channel number is always set to 31 and the hook ID is set to a
number ranging from 300 to 399.
GPR3 = Data required for the trace entry.
GPR4 = Length of the trace entry in bytes. This can range from 0 to 24.
Return Codes:: contained in GPR2
0 = Successful completion
4 = Channel number is not on
8 = Entry is not a full number of words.
5-136
VRM Programming