pt_pkt_get_offset - Man Page

get an Intel(R) Processor Trace packet decoder’s current/synchronization trace buffer offset

Synopsis

#include <intel-pt.h>

int pt_pkt_get_offset(const struct pt_packet_decoder *decoder,

                      uint64_t *offset);

int pt_pkt_get_sync_offset(const struct pt_packet_decoder *decoder,

                           uint64_t *offset);

Link with -lipt.

Description

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

pt_pkt_get_sync_offset() provides decoder’s last synchronization point as offset in bytes from the beginning of decoder’s trace buffer in the unsigned integer variable pointed to by offset.

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 decoder or offset argument is NULL.

pte_nosync

decoder has not been synchronized onto the trace stream. Use pt_pkt_sync_forward(3), pt_pkt_sync_backward(3), or pt_pkt_sync_set(3) to synchronize decoder.

See Also

pt_pkt_alloc_decoder(3), pt_pkt_free_decoder(3), pt_pkt_sync_forward(3), pt_pkt_sync_backward(3), pt_pkt_sync_set(3), pt_pkt_next(3)

Referenced By

pt_pkt_alloc_decoder(3), pt_pkt_sync_forward(3).

The man page pt_pkt_get_sync_offset(3) is an alias of pt_pkt_get_offset(3).