drm/msm: Show process names in gem_describe
In $debugfs/gem we already show any vma(s) associated with an object. Also show process names if the vma's address space is a per-process address space. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
@@ -842,11 +842,28 @@ void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m)
|
||||
|
||||
seq_puts(m, " vmas:");
|
||||
|
||||
list_for_each_entry(vma, &msm_obj->vmas, list)
|
||||
seq_printf(m, " [%s: %08llx,%s,inuse=%d]",
|
||||
vma->aspace != NULL ? vma->aspace->name : NULL,
|
||||
vma->iova, vma->mapped ? "mapped" : "unmapped",
|
||||
list_for_each_entry(vma, &msm_obj->vmas, list) {
|
||||
const char *name, *comm;
|
||||
if (vma->aspace) {
|
||||
struct msm_gem_address_space *aspace = vma->aspace;
|
||||
struct task_struct *task =
|
||||
get_pid_task(aspace->pid, PIDTYPE_PID);
|
||||
if (task) {
|
||||
comm = kstrdup(task->comm, GFP_KERNEL);
|
||||
} else {
|
||||
comm = NULL;
|
||||
}
|
||||
name = aspace->name;
|
||||
} else {
|
||||
name = comm = NULL;
|
||||
}
|
||||
seq_printf(m, " [%s%s%s: aspace=%p, %08llx,%s,inuse=%d]",
|
||||
name, comm ? ":" : "", comm ? comm : "",
|
||||
vma->aspace, vma->iova,
|
||||
vma->mapped ? "mapped" : "unmapped",
|
||||
vma->inuse);
|
||||
kfree(comm);
|
||||
}
|
||||
|
||||
seq_puts(m, "\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user