A kgsl user can free up an allocation of GPU memory with kgsl_ioctl_sharedmem_free() function, but the GPU address might still be in use resulting in a GPU page fault. A bug of this kind is hard to find because the driver keeps no trace of kgsl_ioctl_sharedmem_free calls. This change implements a "memfree history" debug feture that allows to see an information about a last couple of hundred memory free calls in kernel/debug/kgsl/kgsl-3d0/memfree_history file. Change-Id: I12e0e3702db56d99d5de644739b364dea4cc37b1 Signed-off-by: Vladimir Razgulin <vrazguli@codeaurora.org> Signed-off-by: Sakshi Agrawal <sakshia@codeaurora.org>