drm/panfrost: Print RSS for tiler heap BO's in debugfs GEMS file
Subsystems (3)
Adrián Larumbe
maintainerPATCH 1/1 drm/panfrost: Print RSS for tiler heap BO's in debugfs GEMS file
Otherwise it would display the virtual allocation size, which is often much bigger than the RSS.
--- drivers/gpu/drm/panfrost/panfrost_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/panfrost/panfrost_gem.c +2 -1
@@ -432,7 +432,8 @@ static void panfrost_gem_debugfs_bo_print(struct panfrost_gem_object *bo,if (!refcount)return ; - resident_size = bo->base.pages ? bo->base.base.size :0 ; + resident_size = bo->base.pages ? + (bo->is_heap ? bo->heap_rss_size : bo->base.base.size) :0 ;snprintf (creator_info,sizeof (creator_info),"%s/%d" , bo->debugfs.creator.process_name, bo->debugfs.creator.tgid);
base-commit: 934452cbb16e1e3609ba52acb48c503b9aaf3154
Signature · 1 line
2.50.0
Hi Adrián,
drivers/gpu/drm/panfrost/panfrost_gem.c static void panfrost_gem_debugfs_bo_print(struct panfrost_gem_object *bo, · line 436
Quoted 7 lines · Adrián Larumbe
drivers/gpu/drm/panfrost/panfrost_gem.c +2
-1@@ -432,7 +432,8 @@ static void panfrost_gem_debugfs_bo_print(struct panfrost_gem_object *bo,if (!refcount)return ; - resident_size = bo->base.pages ? bo->base.base.size :0 ; + resident_size = bo->base.pages ? + (bo->is_heap ? bo->heap_rss_size : bo->base.base.size) :0 ;
Just use panfrost_gem_rss() here, though you'll need to make it non-static.
With that:
Cheers,
Daniel
Adrián Larumbe
maintainerOn 06.08.2025 16:19, Daniel Stone wrote:
Hi Adrián,
On Thu, 31 Jul 2025 at 18:36, Adrián Larumbe
Quoted 10 lines
drivers/gpu/drm/panfrost/panfrost_gem.c static void panfrost_gem_debugfs_bo_print(struct panfrost_gem_object *bo, · line 436
Quoted 7 lines · <[email protected]> wrote:
drivers/gpu/drm/panfrost/panfrost_gem.c +2
-1@@ -432,7 +432,8 @@ static void panfrost_gem_debugfs_bo_print(struct panfrost_gem_object *bo,if (!refcount)return ; - resident_size = bo->base.pages ? bo->base.base.size :0 ; + resident_size = bo->base.pages ? + (bo->is_heap ? bo->heap_rss_size : bo->base.base.size) :0 ;Just use
panfrost_gem_rss()here, though you'll need to make it non-static.
It's still within the same compilation unit (panfrost_gem.c) so it can remain static.
Quoted 6 lines
With that:
Reviewed-by Daniel Stone <[email protected]>Cheers,
Daniel
Adrian Larumbe