Returns register values.
libtrace.a
#include <sys/libtrace.h>
int trc_reg(handle, regid, ret)
trc_log_handle_t handle;
int regid;
uint64_t *ret;
The trc_reg subroutine is used to retrieve machine-programmable register values from either a processed or raw trace entry. It returns a -1 if the specified item was not traced.
trc_reg is only valid for a 64-bit kernel trace.
Item | Description |
---|---|
handle | Contains the handle returned from a successful trc_open. |
regid | One of the following reserved register identifiers
found in libtrace.h:
|
ret | Points to an unsigned 64-bit integer to hold the return data. If the PURR is returned, it is returned in the same units as the elapsed time (that is, ticks for a raw trace and nanoseconds for a processed trace). |
The trc_reg subroutine returns 0 on success; otherwise, it returns the errno value.
Item | Description |
---|---|
EINVAL | The specified register ID is invalid. |
TRCE_EOF | The
specified register ID is valid but was not
traced. Note: TRCE_EOF is the libtrace error for EOF or not
found.
|