off_cpu_dump(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

off_cpu_dump β€” dump off-cpu samples to ring buffer. That's the whole NAME vibe, bestie, and this page is off_cpu_dump(9) from the Kernel API Manual. It's giving kernel API realness, no cap. πŸ’…


✨ SYNOPSIS ✨

Here's the signature, copied exact because we do not mess with code, periodt:

int off_cpu_dump (void *ctx , struct offcpu_data *data , struct
       offcpu_key *key , struct __stack *stack , __u64 delta );

πŸŽ€ ARGUMENTS πŸŽ€

  • ctx β€” the manpage literally says -- undescribed --, so that's all we get, bestie. No lore, no guessing. πŸ’€
  • data β€” payload for dumping off-cpu samples. It's the stuff getting dumped, slay. ✨
  • key β€” off-cpu data. Yep, that's the description, and we're keeping it iconically brief. πŸŽ€
  • stack β€” stack trace of the task before being scheduled out. Obsessed with a good stack trace, honestly. πŸ¦‹
  • delta β€” also -- undescribed -- in the source, so we are not inventing fanfic for it. πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

So here's the tea: if the threshold of off-cpu time is reached, acquire tid, period, callchain, and cgroup id information of the task, and dump it as a raw sample to perf ring buffer. That's the whole flow, and it ate. πŸ”₯πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./tools/perf/util/bpf_skel/off_cpu.bpf.c

Cute sign-off time 🫢: this page comes from ./tools/perf/util/bpf_skel, dated October 2026, and yes bestie, it's off_cpu_dump(9) β€” bye, go dump those samples with main character energy. πŸ’–βœ¨

πŸ“¦ where this page comes from