pt_enc_get_offset - Man Page

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)

Referenced By

pt_alloc_encoder(3).

The man page pt_enc_sync_set(3) is an alias of pt_enc_get_offset(3).