1PT_PKT_GET_OFFSET(3) PT_PKT_GET_OFFSET(3)
2
3
4
6 pt_pkt_get_offset, pt_pkt_get_sync_offset - get an Intel(R) Processor
7 Trace packet decoder’s current/synchronization trace buffer offset
8
10 #include <intel-pt.h>
11 int pt_pkt_get_offset(const struct pt_packet_decoder *decoder,
12 uint64_t *offset);
13 int pt_pkt_get_sync_offset(const struct pt_packet_decoder *decoder,
14 uint64_t *offset);
15
16 Link with -lipt.
17
19 pt_pkt_get_offset() provides decoder’s current position as offset in
20 bytes from the beginning of decoder’s trace buffer in the unsigned in‐
21 teger variable pointed to by offset.
22
23 pt_pkt_get_sync_offset() provides decoder’s last synchronization point
24 as offset in bytes from the beginning of decoder’s trace buffer in the
25 unsigned integer variable pointed to by offset.
26
28 Both functions return zero on success or a negative pt_error_code enu‐
29 meration constant in case of an error.
30
32 pte_invalid
33 The decoder or offset argument is NULL.
34
35 pte_nosync
36 decoder has not been synchronized onto the trace stream. Use
37 pt_pkt_sync_forward(3), pt_pkt_sync_backward(3), or
38 pt_pkt_sync_set(3) to synchronize decoder.
39
41 pt_pkt_alloc_decoder(3), pt_pkt_free_decoder(3), pt_pkt_sync_for‐
42 ward(3), pt_pkt_sync_backward(3), pt_pkt_sync_set(3), pt_pkt_next(3)
43
44
45
46 PT_PKT_GET_OFFSET(3)