STRUCT KFD_IOCTL_DBG_TRAP_DEVICE_SNAPSHOT_ARGS(9)
π struct kfd_ioctl_dbg_trap_device_snapshot_args(9) β from the Kernel API Manual, bestie β¨
okay so picture this: you're in the Kernel API Manual section 9, and this is the lil struct that carries all the args for KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOT. giving very much "backstage pass to the debug trap" energy π
β¨ NAME β¨
struct kfd_ioctl_dbg_trap_device_snapshot_args β the arguments struct for KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOT. that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
struct kfd_ioctl_dbg_trap_device_snapshot_args {
__u64 exception_mask;
__u64 snapshot_buf_ptr;
__u32 num_devices;
__u32 entry_size;
};
look at her. four fields. flawless. no notes π«Ά
π¦ Members π¦
bestie we're gonna go through each field one by one, no skipping, we do NOT skip in this house π
exception_maskβ (IN) β the exceptions raised to clear. that's the whole job. it goes in, it masks, it slays.snapshot_buf_ptrβ (IN) β pointer to the snapshot buffer (peepkfd_dbg_device_info_entryfor what's actually living in there π).num_devicesβ (IN/OUT) β number of debug devices to snapshot. so here's the deal: the debugger specifies the size of the array it allocated innum_devices. then KFD comes back and tells you the number of devices that actually existed. and if that number is larger than what the debugger specified, KFD will not overflow the array the debugger allocated. iconic behaviour honestly, very "we protect you" of it π§entry_sizeβ (IN/OUT) β size per entry in bytes. the debugger specifiessizeof(struct kfd_dbg_device_info_entry)inentry_size. KFD then returns the number of bytes actually populated. the debugger should useKFD_IOCTL_MINOR_VERSIONto determine which fields instruct kfd_dbg_device_info_entryare valid β which is the whole trick for growing the ABI in a backwards compatible manner, iykyk π. and NOTE, bestie, important:entry_size(IN) should still be used to stride the snapshot buffer in the event that it's larger than actualkfd_dbg_device_info_entry. do not forget that or it's giving chaos.
π₯ Description π₯
Get device information. simple as that. main character errand π
Generic errors apply (see kfd_dbg_trap_operations). Return - 0 on SUCCESS.
So: copies num_devices(IN) device snapshot entries of size entry_size(IN) into snapshot_buf_ptr if num_devices(IN) > 0. Otherwise? returns num_devices(OUT) queue snapshot entries that exist. periodt π
π SEE ALSO π
the whole friend group, fr fr:
- 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_queue_snapshot_args(9) - struct
kfd_ioctl_dbg_trap_args(9) - struct
kfd_ioctl_pmc_settings(9)
okay that's the whole page, ily, go read your device snapshots responsibly π
sourced straight out of ./include/uapi/linux β October 2026 edition, struct kfd_i...napshot_args(9), xoxo πβ¨
π¦ 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