rk: gpu: print more debug info for Android's memtrack
authorCMY <cmy@rock-chips.com>
Fri, 29 Aug 2014 07:20:08 +0000 (15:20 +0800)
committerCMY <cmy@rock-chips.com>
Fri, 29 Aug 2014 07:20:08 +0000 (15:20 +0800)
drivers/gpu/arm/midgard/mali_kbase_gpu_memory_debugfs.c

index e2948b1b501cd8683d0b9dbe278f98fe64181d02..1338b6b61073f7225b16379bc3ecffec6a0bd423 100755 (executable)
@@ -48,10 +48,13 @@ static int kbasep_gpu_memory_seq_show(struct seq_file *sfile, void *data)
                list_for_each_entry(element, &kbdev->kctx_list, link) {
                        /* output the memory usage and cap for each kctx
                        * opened on this device */
-                       ret = seq_printf(sfile, "  %s-0x%p %10u\n", \
-                               "kctx",
+                       ret = seq_printf(sfile, "  %s-0x%p %10u %10u %10u %10u\n", \
+                               "kctx", \
                                element->kctx, \
-                               atomic_read(&(element->kctx->used_pages)));
+                               element->kctx->pid, \
+                               atomic_read(&(element->kctx->osalloc.free_list_size)), \
+                               atomic_read(&(element->kctx->used_pages)), \
+                               atomic_read(&(element->kctx->nonmapped_pages)));
                }
                mutex_unlock(&kbdev->kctx_list_lock);
        }