tracing_reco...sched_switch(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tracing_reco...sched_switch(9) β€” from the Kernel API Manual, bestie 🫢

okay so real talk, this one is a whole function and the name is criminally long, but bestie it SLAPS once you get it. it's called tracing_record_taskinfo_sched_switch and yes we're abbreviating it in the title because girl, look at it 😭


✨ NAME ✨

tracing_record_taskinfo_sched_switch β€” the little icon that records task info when a sched_switch happens πŸ”₯ lowkey its whole personality.


🌸 SYNOPSIS 🌸

void tracing_record_taskinfo_sched_switch (struct task_struct *prev ,
       struct task_struct *next , int flags );

it returns void, so like… don't go looking for a return value, it doesn't have one, periodt πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • prev β€” the previous task during sched_switch. the one getting off the ride πŸ™ˆ
  • next β€” the next task during sched_switch. the one hopping on, main character energy incoming πŸ‘‘
  • flags β€” the vibe check for what you actually wanna record:
    • TRACE_RECORD_CMDLINE for recording comm πŸ’–
    • TRACE_RECORD_TGID for recording tgid 🌈
ngl those two flags are in the same breath in the original, so read it as one vibe: cmd flags for comm, tgid flags for tgid. iykyk 🧚

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./kernel/trace/trace_sched_switch.c β€” literally the source, go read it bestie πŸ“–
  • tracing_record_taskinfo(9) β€” its sibling, obsessed πŸ’œ

so yeah, that's the whole thing: two tasks, some flags, one void, zero drama ✨ fr fr it's giving "small function, big tracing energy" πŸ“

signed off from ./kernel/trace, dated October 2026, with love and a little sparkle πŸŽ€β­πŸ’…

πŸ“¦ where this page comes from