History

drm/amdkfd: add smi events for process start and end

rocm-smi will be able to show the events for KFD process start/end, it is the implementation of this feature.

Eric Huang committed 1 year ago

Commit 4172b551 parent 1d9bff44 files · +31 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/kfd_ioctl.h+5−0
@@ -536,6 +536,8 @@ enum kfd_smi_event { · 535 unmodified lines
536536 KFD_SMI_EVENT_QUEUE_EVICTION = 9,
537537 KFD_SMI_EVENT_QUEUE_RESTORE = 10,
538538 KFD_SMI_EVENT_UNMAP_FROM_GPU = 11,
539+ KFD_SMI_EVENT_PROCESS_START = 12,
540+ KFD_SMI_EVENT_PROCESS_END = 13,
539541
540542 /*
541543 * max event number, as a flag bit to get events from all processes,
@@ -651,6 +653,9 @@ struct kfd_ioctl_smi_events_args { · 109 unmodified lines
651653 "%lld -%d @%lx(%lx) %x %d\n", (ns), (pid), (addr), (size),\
652654 (node), (unmap_trigger)
653655
656+#define KFD_EVENT_FMT_PROCESS(pid, task_name)\
657+ "%x %s\n", (pid), (task_name)
658+
654659 /**************************************************************************************************
655660 * CRIU IOCTLs (Checkpoint Restore In Userspace)
656661 *