gpu: ion: Add debug information for orphaned handles
authorRebecca Schultz Zavin <rebecca@android.com>
Wed, 29 Aug 2012 00:27:22 +0000 (17:27 -0700)
committerArve Hjønnevåg <arve@android.com>
Mon, 1 Jul 2013 21:16:06 +0000 (14:16 -0700)
commitadd49075c04bc26c79fd0ac8e3c20bd6568cb71b
tree5bdd0ad71be325bc5ac62c05b0a9b1f7497240df
parentbc37db4e3d058a7bc270560bc9c7f98cd2277848
gpu: ion: Add debug information for orphaned handles

It is possible for a buffer to exist only as a dma_buf file
descriptor without it being held in any handles.  When this
occurs it is impossible to track where the buffer is in the
system (without traversing every process in the system and
inspecting its file table).  When buffers are orphaned like
this, copy the task comm and pid of the last client to hold
them into the buffer so we have a debugging hint as to where
this buffer came from.  In practice this will probalby be
the process that allocated the buffer.

Change-Id: I49d179f9ccdee36982f365af15d0f0b577c6347e
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
drivers/gpu/ion/ion.c
drivers/gpu/ion/ion_priv.h