Hi, expert,
I am using the phone of MEILAN, which use soc of MT6752 with mali-760 mp2, I want to track process gpu memory usage and found there is a debug node "/d/mali/gpu_memory" which record each process context gpu memory usage. I found that the data is smaller as expected. So I wrote an test apk which allocates an 4M texture(1024*1024 RGBA) each time I touch the screen, but the gpu memory of the test app increase only 1M each time. I also tracked the /proc/meminfo, found the free memory decrease about 4M. so the data of the node "/d/mali/gpu_memory" are not real gpu memory usage?
before:
mali0 38215
kctx-0xe4a90000 12041
kctx-0xe4b70000 591
kctx-0xe53f3000 5921
kctx-0xec855000 10025
kctx-0xebc49000 4826
kctx-0xe494f000 4811
after
mali0 39258
kctx-0xe4a90000 13084
Attachment is the apk, it just create an 1024*1024 RGBA texture each time when you touch the screen. suppose gpu memory will increase about 4M, but above data increase only about 1M.
by the way, how to check mali driver version string?
The figures are the number of 4KB pages, not the number of KB, so it seems to be correctly showing a 4MB increase.
I agree it's not clear and I will ask our kernel driver team to add some units to the print out =P
Cheers, Pete
P.S. The version string is normally part of the version string. Call glGetString with one of the following enums to get more info about the render state:
thanks for your quick reply.
Hi Peter,
my device correctly reports the unit as "pages", so I don't think we need to add units next to the figures, since they are already in the column headings:
context name context addr used pages shrink pages pmem pages tmem pages others ============================================================================================================= ( Thread-182), kctx-0xeee68000 116 29 2 105 9 ( surfaceflinger), kctx-0xee058000 571 421 52 394 125 ........
I am glad this was solved, thanks.
lorenzodalcol Thanks for confirming - looks like the driver team have already improved the report layout in the latest r5px driver release series.
Pete