I would like to know if any existing ways are there to find out per-process GPU memory utilization so that I can easily find out which is the most GPU memory hungry process in my system. I tried to figure it out using DS-5 but it only shows the total GPU memory utilization not process wise.
I believe by providing some hacks in mali kernel driver, we would be able to trace it out. Any pointers? Mali GPU I'm working on is T604 and driver version is r2p1-00rel0 .
No - there are no driver memory counters in DS-5 for the Midgard GPU family.
The latest Mali drivers for the Midgard family support a "memory" node in the kernel debugfs file system which you can "cat" to get a breakdown of memory by process context, provided that your system provider has compiled the kernel driver with this option enabled, but this is not available in r2p1.
EDIT Note that most (but not all) graphics memory is mapped into the process address space so most memory allocations show up via a the memory statistics shown via a normal "top" call.
Cheers, Pete