% PT_QRY_GET_OFFSET(3) # NAME pt_qry_get_offset, pt_qry_get_sync_offset - get an Intel(R) Processor Trace query decoder's current/synchronization trace buffer offset # SYNOPSIS | **\#include ``** | | **int pt_qry_get_offset(const struct pt_query_decoder \**decoder*,** | **uint64_t \**offset*);** | **int pt_qry_get_sync_offset(const struct pt_query_decoder \**decoder*,** | **uint64_t \**offset*);** Link with *-lipt*. # DESCRIPTION **pt_qry_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_qry_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_qry_sync_forward**(3), **pt_qry_sync_backward**(3), or **pt_qry_sync_set**(3) to synchronize *decoder*. # SEE ALSO **pt_qry_alloc_decoder**(3), **pt_qry_free_decoder**(3), **pt_qry_sync_forward**(3), **pt_qry_sync_backward**(3), **pt_qry_sync_set**(3), **pt_qry_get_config**(3), **pt_qry_cond_branch**(3), **pt_qry_indirect_branch**(3), **pt_qry_event**(3), **pt_qry_time**(3), **pt_qry_core_bus_ratio**(3)