[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, Volume 1

trcgenk Kernel Service

Purpose

Records a trace event for a generic trace channel.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/trchkid.h>


void trcgenk (chan, hk_word, data_word, len, buf)
unsigned int chan, hk_word, data_word, len;
char * buf;

Parameters

chan Specifies the channel number for the trace session. This number is obtained from the trcstart subroutine.
hk_word An integer containing a hook ID and a hook type:
hk_id
A hook identifier is a 12-bit value. For user programs, the hook ID can be a value from 0x010 to 0x0FF.
hk_type
A 4-bit hook type. The trcgenk kernel service automatically records this information.
data_word Specifies a word of user-defined data.
len Specifies the length in bytes of the buffer specified by the buf parameter.
buf Points to a buffer of trace data. The maximum amount of trace data is 4096 bytes.

Description

The trcgenk kernel service records a trace event if a trace session is active for the specified trace channel. If a trace session is not active, the trcgenk kernel service simply returns. The trcgenk kernel service is located in pinned kernel memory.

The trcgenk kernel service is used to record a trace entry consisting of an hk_word entry, a data_word entry, and a variable number of bytes of trace data.

Execution Environment

The trcgenk kernel service can be called from either the process or interrupt environment.

Return Values

The trcgenk kernel service has no return values.

Related Information

The trace daemon.

The trcgenkt kernel service.

The trcgen subroutine, trcgent subroutine, trchook subroutine, trcoff subroutine, trcon subroutine, trcstart subroutine, trcstop subroutine.

RAS Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]