PT_ENC_GET_CONFIG(3)
✨ PT_ENC_GET_CONFIG(3) ✨
okay bestie, welcome to PT_ENC_GET_CONFIG — the section 3 page about getting an Intel(R) Processor Trace encoder/decoder's configuration 💅 six whole functions, one very chill job.
💖 NAME 💖
pt_enc_get_config, pt_pkt_get_config, pt_evt_get_config, pt_qry_get_config, pt_insn_get_config, pt_blk_get_config — get an Intel(R) Processor Trace encoder/decoder's configuration 🦋
🌸 SYNOPSIS 🌸
#include <intel-pt.h>
const struct pt_config *
pt_enc_get_config(const struct pt_encoder *encoder);
const struct pt_config *
pt_pkt_get_config(const struct pt_packet_decoder *decoder);
const struct pt_config *
pt_evt_get_config(const struct pt_event_decoder *decoder);
const struct pt_config *
pt_qry_get_config(const struct pt_query_decoder *decoder);
const struct pt_config *
pt_insn_get_config(const struct pt_insn_decoder *decoder);
const struct pt_config *
pt_blk_get_config(const struct pt_block_decoder *decoder);
Link with -lipt.
six functions. same shape. different friend. you pass in your encoder or your decoder, you get back a pointer to its config. that's the whole vibe check 🎀
and fr fr, don't forget: Link with -lipt. no -lipt, no link, no slay 💀
🫶 DESCRIPTION 🫶
so here's the tea ☕ these functions return a pointer to their argument's configuration. that's it. that's the function.
but lowkey the important part is the ownership rules, and bestie you have to remember these:
- The returned configuration object must not be freed. not yours. hands off. 🙈
- It is valid as long as their argument is not freed.
so like… the config is riding shotgun with the encoder/decoder it came from. the moment that thing gets freed, your pointer is giving expired-milk energy 😭 don't touch it after that.
⭐ RETURN VALUE ⭐
- these functions return a pointer to a
pt_configobject 👑 - the returned pointer is
NULLif their argument isNULL— so if you hand it nothing, it hands you nothing back. fair. balanced. iconic. 💅
(also yes, the original really does say "returns" instead of "return". we love a typo that ate. periodt.)
🌈 SEE ALSO 🌈
go read these next, i'm obsessed with them:
pt_config(3)pt_alloc_encoder(3)pt_pkt_alloc_decoder(3)pt_evt_alloc_decoder(3)pt_qry_alloc_decoder(3)pt_insn_alloc_decoder(3)pt_blk_alloc_decoder**(3)
and that's the page, bestie!! you just read PT_ENC_GET_CONFIG(3), section 3 of the manual, top to bottom, no skips, main character energy only 🧚💖 mwah, go forth and get your config 🎀
📦 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