summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/nvmap
diff options
context:
space:
mode:
authorKirill Artamonov <kartamonov@nvidia.com>2012-10-23 14:34:48 +0300
committerMandar Padmawar <mpadmawar@nvidia.com>2013-01-23 02:51:37 -0800
commitd33ca120d12b52e095e4e1cba5b183b50da0f44f (patch)
treefdfb83cd4717732159361a518d6ed35e8c4452a2 /drivers/video/tegra/nvmap
parent21f587e6a18a48a818356d301b197d0fe1a03b99 (diff)
nvmap: expose refs, dupes, pins in debugfs
Expose data needed for debugging memory leaks in nvmap. Change-Id: I7011ea63eceb6a2de9cd8363c78555dee680ae04 Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com> Reviewed-on: http://git-master/r/171178 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Antoine Chauveau <achauveau@nvidia.com> Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/nvmap')
-rw-r--r--drivers/video/tegra/nvmap/nvmap_dev.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c
index bdb0f8b90630..2545cb4ed346 100644
--- a/drivers/video/tegra/nvmap/nvmap_dev.c
+++ b/drivers/video/tegra/nvmap/nvmap_dev.c
@@ -1027,9 +1027,14 @@ static void allocations_stringify(struct nvmap_client *client,
if (handle->alloc && handle->heap_pgalloc == iovmm) {
phys_addr_t base = iovmm ? 0 :
(handle->carveout->base);
- seq_printf(s, "%-18s %-18s %8llx %10u %8x\n", "", "",
- (unsigned long long)base,
- handle->size, handle->userflags);
+ seq_printf(s,
+ "%-18s %-18s %8llx %10u %8x %6u %6u %6u\n",
+ "", "",
+ (unsigned long long)base, handle->size,
+ handle->userflags,
+ atomic_read(&handle->ref),
+ atomic_read(&ref->dupes),
+ atomic_read(&ref->pin));
}
}
}
@@ -1042,10 +1047,11 @@ static int nvmap_debug_allocations_show(struct seq_file *s, void *unused)
unsigned int total = 0;
spin_lock_irqsave(&node->clients_lock, flags);
- seq_printf(s, "%-18s %18s %8s %10s %8s\n", "CLIENT", "PROCESS", "PID",
- "SIZE", "FLAGS");
- seq_printf(s, "%-18s %18s %8s %10s\n", "", "",
- "BASE", "SIZE");
+ seq_printf(s, "%-18s %18s %8s %10s\n",
+ "CLIENT", "PROCESS", "PID", "SIZE");
+ seq_printf(s, "%-18s %18s %8s %10s %8s %6s %6s %6s\n",
+ "", "", "BASE", "SIZE", "FLAGS", "REFS",
+ "DUPES", "PINS");
list_for_each_entry(commit, &node->clients, list) {
struct nvmap_client *client =
get_client_from_carveout_commit(node, commit);
@@ -1151,10 +1157,11 @@ static int nvmap_debug_iovmm_allocations_show(struct seq_file *s, void *unused)
struct nvmap_device *dev = s->private;
spin_lock_irqsave(&dev->clients_lock, flags);
- seq_printf(s, "%-18s %18s %8s %10s %8s\n", "CLIENT", "PROCESS", "PID",
- "SIZE", "FLAGS");
- seq_printf(s, "%-18s %18s %8s %10s\n", "", "",
- "BASE", "SIZE");
+ seq_printf(s, "%-18s %18s %8s %10s\n",
+ "CLIENT", "PROCESS", "PID", "SIZE");
+ seq_printf(s, "%-18s %18s %8s %10s %8s %6s %6s %6s\n",
+ "", "", "BASE", "SIZE", "FLAGS", "REFS",
+ "DUPES", "PINS");
list_for_each_entry(client, &dev->clients, list) {
client_stringify(client, s);
seq_printf(s, " %10u\n", atomic_read(&client->iovm_commit));