Macros for recording trace events
Macros to record each possible type of event record are defined in the /usr/include/sys/trcmacros.h file.
The event IDs are defined in the /usr/include/sys/trchkid.h file. Include these two files in any program that is recording trace events.
The macros to record events on channel 0 with a time stamp are
as follows:
TRCHKL0T(hw)
TRCHKL1T(hw,D1)
TRCHKL2T(hw,D1,D2)
TRCHKL3T(hw,D1,D2,D3)
TRCHKL4T(hw,D1,D2,D3,D4)
TRCHKL5T(hw,D1,D2,D3,D4,D5)
On earlier versions of AIX,
use the following macros to record events on channel 0 without a time
stamp:
TRCHKL0(hw)
TRCHKL1(hw,D1)
TRCHKL2(hw,D1,D2)
TRCHKL3(hw,D1,D2,D3)
TRCHKL4(hw,D1,D2,D3,D4)
TRCHKL5(hw,D1,D2,D3,D4,D5)
All trace events are time stamped regardless of the macros used.
The type field of the trace event record is set to the value that corresponds to the macro used, regardless of the value of those four bits in the hw parameter.
Only two macros record events to one of the generic channels (1-7).
These are as follows:
TRCGEN(ch,hw,D1,len,buf)
TRCGENT(ch,hw,D1,len,buf)
These macros record in the event stream specified by the channel parameter (ch), a hook word (hw), a data word (D1) and len bytes from the user's data segment beginning at the location specified by buf.