diff options
author | Harshdeep Dhatt <hdhatt@codeaurora.org> | 2016-01-06 14:52:02 -0700 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:16:58 -0700 |
commit | 55946b698578eb75a2d05611004f521864409355 (patch) | |
tree | e353bdcbc78229901c1bdf5e8304e61b60635ddd /drivers/gpu/msm/kgsl_debugfs.c | |
parent | 0117f1ce831945422d463f493b4cf1d81e3a7067 (diff) |
msm: kgsl: Add accounting for memory mapped in userspace
For proper memory accounting, a key metric is to know how much
memory kgsl allocated for a process and how much of it the process
is actually using. This is done by keeping track of memory in our
vmfault routines. This information is provided via the process
mem file.
Change-Id: I7e3371a708ea5fdade3840b2384b3bc4012ad004
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Diffstat (limited to 'drivers/gpu/msm/kgsl_debugfs.c')
-rw-r--r-- | drivers/gpu/msm/kgsl_debugfs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/msm/kgsl_debugfs.c b/drivers/gpu/msm/kgsl_debugfs.c index 11095f38bad7..fa523ac9516c 100644 --- a/drivers/gpu/msm/kgsl_debugfs.c +++ b/drivers/gpu/msm/kgsl_debugfs.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2002,2008-2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2002,2008-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -144,12 +144,12 @@ static int print_mem_entry(int id, void *ptr, void *data) kgsl_get_memory_usage(usage, sizeof(usage), m->flags); - seq_printf(s, "%pK %pK %16llu %5d %8s %10s %16s %5d", + seq_printf(s, "%pK %pK %16llu %5d %8s %10s %16s %5d %16llu", (uint64_t *)(uintptr_t) m->gpuaddr, (unsigned long *) m->useraddr, m->size, entry->id, flags, memtype_str(kgsl_memdesc_usermem_type(m)), - usage, m->sgt->nents); + usage, m->sgt->nents, m->mapsize); if (entry->metadata[0] != 0) seq_printf(s, " %s", entry->metadata); @@ -163,9 +163,9 @@ static int process_mem_print(struct seq_file *s, void *unused) { struct kgsl_process_private *private = s->private; - seq_printf(s, "%8s %8s %8s %5s %8s %10s %16s %5s\n", + seq_printf(s, "%16s %16s %16s %5s %8s %10s %16s %5s %16s\n", "gpuaddr", "useraddr", "size", "id", "flags", "type", - "usage", "sglen"); + "usage", "sglen", "mapsize"); spin_lock(&private->mem_lock); idr_for_each(&private->mem_idr, print_mem_entry, s); |