ARM: mali400: r5p2_rel0: add GLES mem profiler feature 56/69356/2
authorYoungJun Cho <yj44.cho@samsung.com>
Tue, 21 Jul 2015 04:19:27 +0000 (13:19 +0900)
committerJoonyoung Shim <jy0922.shim@samsung.com>
Mon, 23 May 2016 06:41:30 +0000 (15:41 +0900)
commit395703b8a280cfe1eaf64f8da4d55f8cdcb806af
treedb94a29fe018b7f3874e9eeaea187cc772b9fd5a
parentc20f05f1b590313f80d4d8d1e3e742acb0878062
ARM: mali400: r5p2_rel0: add GLES mem profiler feature

This patch adds GLES mem profiler feature.

You could use it by "cat /sys/kernel/debug/mali/gles_mem/<PID>".
Without user-DDK's MALI_IOC_MEM_PROFILE_GLES_MEM, it only show layout.

With this ioctl, you could check current GLES relevant memory status
in opened session and also check memory leakage in trash subdirectory.

The mechanism of detecting memory leakage is checking information when
the session is closed. So the user misses to free (GLES)memory during
session, it(the PID) could be found in trash.

Caution! When app is killed and the session is forcely shut down, then
it(the PID) could be found in trash but we can not guarantee there is a
real memory leakage. That is because like this case, it is impossible
to call MALI_IOC_MEM_PROFILE_GLES_MEM to remove allocated memory.

Change-Id: I78a08f7b53594dc20f8cc6f4c892250fdc9e8208
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
[jy0922.shim: applied to r5p2_rel0 from r5p0_rel0]
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
drivers/gpu/arm/mali400/r5p2_rel0/Kbuild
drivers/gpu/arm/mali400/r5p2_rel0/common/mali_session.c
drivers/gpu/arm/mali400/r5p2_rel0/common/mali_session.h
drivers/gpu/arm/mali400/r5p2_rel0/include/linux/mali/mali_utgard_ioctl.h
drivers/gpu/arm/mali400/r5p2_rel0/include/linux/mali/mali_utgard_uk_types.h
drivers/gpu/arm/mali400/r5p2_rel0/linux/mali_kernel_linux.c
drivers/gpu/arm/mali400/r5p2_rel0/linux/mali_kernel_sysfs.c
drivers/gpu/arm/mali400/r5p2_rel0/linux/mali_kernel_sysfs.h
drivers/gpu/arm/mali400/r5p2_rel0/linux/mali_ukk_mem.c
drivers/gpu/arm/mali400/r5p2_rel0/linux/mali_ukk_wrappers.h