STRUCT THREAD_STACK_ENTRY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct thread_stack_entry(9) β€” the kernel API manual for my bestie πŸ’–

okay so this is a page from the Kernel API Manual, and today's main character is struct thread_stack_entry β€” yes, a thread stack entry, and honestly? it's giving "small struct, big responsibilities" ✨


🌸 NAME 🌸

struct thread_stack_entry β€” thread stack entry. that's it, that's the whole name, no notes πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct thread_stack_entry {
    u64 ret_addr;
    u64 timestamp;
    u64 ref;
    u64 branch_count;
    u64 insn_count;
    u64 cyc_count;
    u64 db_id;
    struct call_path *cp;
    bool no_call;
    bool trace_end;
    bool non_call;
 };

look at her. eleven members. every single one of them matters, bestie, we're going through all of them 🫢


πŸŽ€ Members πŸŽ€

  • ret_addr β€” the return address. where we're going back to, queen πŸ‘‘
  • timestamp β€” the timestamp, if known. conditional king behavior ⭐
  • ref β€” an external reference, like the db_id of a sample. it's the link back to where this came from πŸ”₯
  • branch_count β€” the branch count at the moment the entry was created. snapshot energy πŸ“Έ
  • insn_count β€” the instruction count at the moment the entry was created. same snapshot, different stat πŸ’«
  • cyc_count β€” the cycle count at the moment the entry was created. three for three on the snapshot vibes 😭
  • db_id β€” the id used for db-export. that's her whole job, no cap πŸŽ€
  • cp β€” the call path. (it's a struct call_path *, so yes, pointer moment πŸ¦‹)
  • no_call β€” a 'call' was not seen. absence noticed, respectfully πŸ™ˆ
  • trace_end β€” it was a 'call' but the trace ended. the plot twist πŸ’€
  • non_call β€” a branch but not a 'call' to the start of a different symbol. very specific, very valid 🌸

🌈 SEE ALSO 🌈

  • The kernel file ./tools/perf/util/thread-stack.c
  • struct thread_stack(9)

okay that's the whole page, and before you go β€” the source/version on this one is ./tools/perf/util and the date is October 2026. write it down, bestie, iykyk πŸ“πŸ’œ and yeah, this whole thing was struct thread_stack_entry(9) all along. slay πŸ’…βœ¨

πŸ“¦ where this page comes from