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: I23f88757e36864395f07846384efcea038ca04ee
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Git-commit: 357e13ef6304c6a7d625789e86c35ef964d8b224
Git-repo: https://android.googlesource.com/kernel/common
[lauraa@codeaurora.org: Conflicts in ion.c due to differences
in debugfs infrastructure]
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2 files changed