STRUCT THREAD_STACK_ENTRY(9)
π 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 thedb_idof 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 astruct 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms