stack_trace_save_tsk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… stack_trace_save_tsk β€” Kernel API Manual ✨

okay bestie, welcome to the manual page for stack_trace_save_tsk(9), straight out of the Kernel API Manual. it's a little function, it does one thing, and it does it iconically. let's get into it 🫢


🌸 NAME 🌸

stack_trace_save_tsk β€” save a task stack trace into a storage array πŸ’Ύβœ¨

like, it grabs the trace and tucks it into your array. that's the whole vibe.


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned int stack_trace_save_tsk (struct task_struct *task , unsigned
long *store , unsigned int size , unsigned int skipnr );

no cap, that's the exact signature. copy it character for character or the compiler WILL come for you 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • task β€” the task you wanna examine πŸ‘€ like, the one whose stack trace you're snooping on (affectionately).
  • store β€” pointer to the storage array πŸ“¦ this is where the goods go.
  • size β€” size of the storage array πŸ“ how much room you've got to work with.
  • skipnr β€” number of entries to skip at the start of the stack trace πŸ™ˆ because sometimes the top of the trace is just noise and you're like "not me, not this one."

⭐ RETURN ⭐

returns the number of trace entries stored πŸ”₯ that's it. that's the number. slay.


🧚 SEE ALSO 🧚

the friend group πŸ’œ all of these live in the kernel file ./kernel/stacktrace.c:

and yes, some of them are listed twice β€” the source page said it twice so we're saying it twice. consistency is a lifestyle πŸ’…βœ¨


go read the source at ./kernel/stacktrace.c if you want the full lore. iykyk πŸ¦‹

okay that's the whole page, mwah πŸ’– this one's from the ./kernel corner of the world, October 2026, filed under stack_trace_save_tsk(9) β€” periodt. πŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from