STRUCT KFD_IOCTL_DBG_TRAP_QUEUE_SNAPSHOT_ARGS(9)
π struct kfd_ioctl_dbg_trap_queue_snapshot_args(9) π
okay so real talk, this is straight out of the Kernel API Manual, section 9, and the page is literally called struct kfd_ioctl_dbg_trap_queue_snapshot_args. yes bestie that's a whole mouthful, i know, but stick with me because it's actually so good π«Ά
β¨ NAME β¨
struct kfd_ioctl_dbg_trap_queue_snapshot_args β the argument struct for KFD_IOC_DBG_TRAP_GET_QUEUE_SNAPSHOT. it's giving "the little envelope that carries your queue-snapshot request," and honestly? iconic π
πΈ SYNOPSIS πΈ
struct kfd_ioctl_dbg_trap_queue_snapshot_args {
__u64 exception_mask;
__u64 snapshot_buf_ptr;
__u32 num_queues;
__u32 entry_size;
};
four fields. that's it. that's the whole vibe check, and it passed with flying colors β
π Members π
exception_maskβ this one is (IN), and it's all about the exceptions raised to clear. lowkey the cleanup crew of the struct π§Ήsnapshot_buf_ptrβ (IN), and it points at your queue snapshot entry buffer (peepkfd_queue_snapshot_entryfor the deets). it's the address where the good stuff lands πnum_queuesβ (IN/OUT), the number of queue snapshot entries. here's the tea: the debugger specifies the size of the array it allocated innum_queues, and then KFD comes back and returns the number of queues that actually existed. and if that's bigger than what the debugger said? KFD will not overflow the array the debugger allocated. no cap, it's polite like that πentry_sizeβ (IN/OUT), size per entry in bytes. the debugger plopssizeof(struct kfd_queue_snapshot_entry)intoentry_size, and KFD returns the number of bytes actually populated per entry. the debugger should useKFD_IOCTL_MINOR_VERSIONto figure out which fields instruct kfd_queue_snapshot_entryare valid β that's how you grow an ABI in a backwards compatible manner, slay π . heads up though:entry_size(IN)should still be used to stride the snapshot buffer in the event that it's larger than actualkfd_queue_snapshot_entry. don't skip that part bestie, it matters π₯
π¦ Description π¦
get queue information. that's the whole mission, and it ate π
generic errors apply (go see kfd_dbg_trap_operations). returns - 0 on SUCCESS.
so here's the flow, literally step by step:
- it copies
num_queues(IN)queue snapshot entries of sizeentry_size(IN)intosnapshot_buf_ptrifnum_queues(IN) > 0 - otherwise it returns
num_queues(OUT)queue snapshot entries that exist
like, either you hand it a buffer and it fills it, or you hand it nothing and it tells you how many exist. main character energy either way π
π SEE ALSO π
- Kernel file
./include/uapi/linux/kfd_ioctl.h struct kfd_ioctl_criu_args(9)enum kfd_ioctl_svm_op(9)enum kfd_ioctl_svm_attr_type(9)struct kfd_ioctl_svm_attribute(9)struct kfd_ioctl_svm_args(9)struct kfd_ioctl_set_xnack_mode_args(9)struct kfd_ioctl_runtime_enable_args(9)struct kfd_ioctl_dbg_trap_enable_args(9)struct kfd_ioctl_dbg_trap_send_runtime_event_args(9)struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args(9)struct kfd_ioctl_dbg_trap_set_wave_launch_override_args(9)struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args(9)struct kfd_ioctl_dbg_trap_suspend_queues_args(9)struct kfd_ioctl_dbg_trap_resume_queues_args(9)struct kfd_ioctl_dbg_trap_set_node_address_watch_args(9)struct kfd_ioctl_dbg_trap_clear_node_address_watch_args(9)struct kfd_ioctl_dbg_trap_set_flags_args(9)struct kfd_ioctl_dbg_trap_query_debug_event_args(9)struct kfd_ioctl_dbg_trap_query_exception_info_args(9)struct kfd_ioctl_dbg_trap_device_snapshot_args(9)struct kfd_ioctl_dbg_trap_args(9)struct kfd_ioctl_pmc_settings(9)
that's a whole friend group right there, go say hi π«Ά
and that's the whole page bestie!! π this one came from ./include/uapi/linux, dated October 2026, and it's filed under struct kfd_...napshot_args(9) in your friendly neighborhood Kernel API Manual. now go snapshot some queues, you absolute legend πβ¨
π¦ 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