Files
metal2vulkan/scripts
Anees Iqbal ad36ede027 scripts/dma-buf-leak: a per-object trace of the GPU VM bookkeeping, and a properties-query knob in repro.c
kernel-holds-gpuvm.bt follows each GEM object imported from a dma-buf named
m2vleak* and counts its import order among its dma-buf's imports, its vm_bos
created, put, put deferred, moved to the deferred list and destroyed, its
VAs linked and unlinked, the driver's map and unmap steps, its GEM closes and
its reference count at the last handle close; it prints one table for the
objects released and one for those still alive at exit, the kernel stacks of
deferred puts, deferred cleanups and VA unlinks, and the probe's vm_bos still
alive at each VM's teardown.

repro.c -p: 1 queries vkGetMemoryFdPropertiesKHR on each dma-buf before the
import (as the spec requires); 0 skips it (a diagnostic, breaking
VUID-VkMemoryAllocateInfo-memoryTypeIndex-00648); 2 makes the query alone.
The kept dma-bufs on the measured driver each had two GEM imports, which the
query may account for.
2026-11-11 07:58:49 -08:00
..