PT_ENC_GET_OFFSET(3)

NAME

pt_enc_get_offset, pt_enc_sync_set - get/set an Intel(R) Processor Trace packet encoder’s current trace buffer offset

SYNOPSIS

#include <intel-pt.h>
int pt_enc_get_offset(const struct pt_packet_encoder *encoder,
uint64_t *offset);
int pt_enc_sync_set(const struct pt_packet_encoder *encoder,
uint64_t offset);

Link with -lipt.

DESCRIPTION

pt_enc_get_offset() provides encoder’s current position as offset in bytes from the beginning of encoder’s trace buffer in the unsigned integer variable pointed to by offset.

pt_enc_sync_set() sets encoder’s current position to offset bytes from the beginning of its trace buffer.

RETURN VALUE

Both functions return zero on success or a negative pt_error_code enumeration constant in case of an error.

ERRORS

pte_invalid
    The encoder or offset (for pt_enc_sync_set()) argument is NULL.

pte_eos
    The offset argument is too big and the resulting position would be outside of encoder’s trace buffer (pt_enc_sync_set() only).

SEE ALSO

pt_enc_alloc_encoder(3), pt_enc_free_encoder(3), pt_enc_next(3)