On Wed, 20 Oct 2021 20:10:24 -0700 Gurchetan Singh <gurchetansingh@xxxxxxxxxxxx> wrote: > @@ -305,6 +306,7 @@ drm_gem_object_release_handle(int id, void *ptr, void *data) > drm_gem_remove_prime_handles(obj, file_priv); > drm_vma_node_revoke(&obj->vma_node, file_priv); > > + drm_gem_trace_gpu_mem_instance(dev, file_priv, -obj->size, false); I would suggest adding the trace_*_enabled() if statements around all these callers. -- Steve > drm_gem_object_handle_put_unlocked(obj); > > return 0;