die_walk_instances(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… die_walk_instances(9) β€” the Kernel API Manual, bestie edition

okay so this is die_walk_instances from the kernel API manual (section 9, the kernel-functions one) β€” and yes it's a whole vibe, let's get into it ✨


🌸 NAME 🌸

die_walk_instances β€” walk the instances of a given DIE, literally that's the whole job 🫢


✨ SYNOPSIS ✨

int die_walk_instances (Dwarf_Die *or_die , int (*callback)(Dwarf_Die *,
void *) , void *data );

no cap, that's the whole signature πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • or_die β€” an abstract original DIE. that's the starting point, the main character of this whole operation πŸ‘‘
  • callback β€” the callback function, and it gets called with each instance DIE. like it gets handed the instance, fr fr πŸ¦‹
  • data β€” user data. your stuff, your business, passed straight through πŸ’œ

πŸ”₯ DESCRIPTION πŸ”₯

so you're walking on the instances of the given in_die (yes, the description calls it in_die while the signature says or_die β€” that's just how it is, we don't question the lore πŸ™ˆ).

in_die must be an inlined function declaration. like, that's not a suggestion, that's the requirement πŸ’€

what it returns:

  • the return value of callback, if the callback returns a non-zero value β€” it bails out right there and hands you back whatever your callback said πŸƒβ€β™€οΈπŸ’¨
  • -ENOENT if there is no instance. no instance, no problem, just a negative errno in your lap 😭

🌈 SEE ALSO 🌈

bestie the whole friend group is here, and they're all icons β€” also peep the kernel file ./tools/perf/util/dwarf-aux.c:


and that's the page, periodt πŸ’… this one lives under ./tools/perf/util and the version stamp says October 2026 β€” so yeah, it's giving very much current, very much slay, go off kernel docs πŸŽ€βœ¨

πŸ“¦ where this page comes from