tracing_reco...sched_switch(9)
π 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 duringsched_switch. the one getting off the ride πnextβ the next task duringsched_switch. the one hopping on, main character energy incoming πflagsβ the vibe check for what you actually wanna record:TRACE_RECORD_CMDLINEfor recording comm πTRACE_RECORD_TGIDfor 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
- 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