trcgen or trcgent Subroutine

Purpose

Records a trace event for a generic trace channel.

Library

Runtime Services Library (librts.a)

Syntax

#include <sys/trchkid.h>
void trcgen(Channel, HkWord, DataWord, Length, Buffer)
unsigned int  Channel,  HkWord,  DataWord,  Length;
char * Buffer;
void trcgent(Channel, HkWord, DataWord, Length, Buffer)
unsigned int Channel, HkWord, DataWord, Length;
char *Buffer;

Description

The trcgen subroutine records a trace event for a generic trace entry consisting of a hook word, a data word, a variable number of bytes of trace data and, beginning with AIX 5L Version 5.3 with the 5300-05 Technology Level, a time stamp. The trcgent subroutine records a trace event for a generic trace entry consisting of a hook word, a data word, a variable number of bytes of trace data, and a time stamp.

The trcgen subroutine and trcgent subroutine are located in pinned kernel memory.

Parameters

Item Description
Buffer Specifies a pointer to a buffer of trace data. The maximum size of the trace data is 4096 bytes.
Channel Specifies a channel number for the trace session, obtained from the trcstart subroutine.
DataWord Specifies a word of user-defined data.
HkWord Specifies an integer consisting of two bytes of user-defined data (HkData), a hook ID (HkID), and a hook type (Hk_Type).
HkData
Specifies two bytes of user-defined data.
HkID
Specifies a hook identifier. For applications before AIX® 6.1 and 32-bit applications running on AIX 6.1 and later, the hook ID value ranges from hex 010 through hex 0FF. For 64-bit applications running on AIX 6.1 and later, the hook ID value ranges from hex 0100 through hex 0FF0.
Length Specifies the length in bytes of the Buffer parameter.