PT_INSN_GET_OFFSET(3)
✨ PT_INSN_GET_OFFSET ✨
okay so this is the manual page for pt_insn_get_offset and pt_insn_get_sync_offset, section 3, bestie 💅
🌸 NAME 🌸
pt_insn_get_offset, pt_insn_get_sync_offset — get an Intel(R) Processor Trace instruction flow decoder’s current/synchronization trace buffer offset 🦋
🎀 SYNOPSIS 🎀
#include <intel-pt.h>
int pt_insn_get_offset(const struct pt_insn_decoder *decoder,
uint64_t *offset);
int pt_insn_get_sync_offset(const struct pt_insn_decoder *decoder,
uint64_t *offset);
Link with -lipt.
💜 DESCRIPTION 💜
so pt_insn_get_offset() gives you the decoder’s current position, as an offset in bytes from the beginning of the decoder’s trace buffer, and it drops that into the unsigned integer variable that offset points to. periodt. 💅
and pt_insn_get_sync_offset() does the same lil dance but for the decoder’s last synchronization point — also as an offset in bytes from the beginning of the decoder’s trace buffer, also into the unsigned integer variable pointed to by offset. iconic. ✨
🌈 RETURN VALUE 🌈
both functions return zero on success 🫶 or a negative pt_error_code enumeration constant if something went wrong 😭
🔥 ERRORS 🔥
pte_invalid— thedecoderoroffsetargument isNULL. not the vibe. 💀pte_nosync—decoderhas not been synchronized onto the trace stream. bestie, you gotta usept_insn_sync_forward(3),pt_insn_sync_backward(3), orpt_insn_sync_set(3)to synchronize the decoder first. 🧚
no sync = no offset, that's just the rules 🙈
👑 SEE ALSO 👑
pt_insn_alloc_decoder(3), pt_insn_free_decoder(3), pt_insn_sync_forward(3), pt_insn_sync_backward(3), pt_insn_sync_set(3), pt_insn_get_config(3), pt_insn_time(3), pt_insn_core_bus_ratio(3), pt_insn_next(3)
and that's the whole page, bestie 💖 this one’s straight out of the PT_INSN_GET_OFFSET(3) manual, section 3, footer and all — same name, same page, just with way more sparkle. go off, you got this 🌟💅
📦 where this page comes from
- fedora 43: libipt-devel 2.1.2-3.fc43 · BSD-3-Clause
- fedora 43: libipt-devel 2.1.2-3.fc43 · BSD-3-Clause
- fedora 44: libipt-devel 2.1.2-4.fc44 · BSD-3-Clause
- fedora 44: libipt-devel 2.1.2-4.fc44 · BSD-3-Clause
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms