From: Ben Widawsky <ben@bwidawsk.net>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Print how many objects are shared in per-process statsg
Date: Wed, 19 Mar 2014 21:42:49 -0700 [thread overview]
Message-ID: <20140320044248.GB1748@bwidawsk.net> (raw)
In-Reply-To: <1395236746-15093-2-git-send-email-chris@chris-wilson.co.uk>
On Wed, Mar 19, 2014 at 01:45:46PM +0000, Chris Wilson wrote:
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Any clue how you intend to use this for a commit message (I'm actually
curious)? Also, the subject is wrong, you're counting size, not
quantity. Anyhoo, looks correct.
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 4e1787ee8f37..9cc1c9360238 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -301,7 +301,9 @@ static int i915_gem_stolen_list_info(struct seq_file *m, void *data)
> struct file_stats {
> struct drm_i915_file_private *file_priv;
> int count;
> - size_t total, global, active, inactive, unbound;
> + size_t total, unbound;
> + size_t global, shared;
> + size_t active, inactive;
> };
>
> static int per_file_stats(int id, void *ptr, void *data)
> @@ -313,6 +315,9 @@ static int per_file_stats(int id, void *ptr, void *data)
> stats->count++;
> stats->total += obj->base.size;
>
> + if (obj->base.name || obj->base.dma_buf)
> + stats->shared += obj->base.size;
> +
> if (USES_FULL_PPGTT(obj->base.dev)) {
> list_for_each_entry(vma, &obj->vma_list, vma_link) {
> struct i915_hw_ppgtt *ppgtt;
> @@ -450,13 +455,14 @@ static int i915_gem_object_info(struct seq_file *m, void* data)
> */
> rcu_read_lock();
> task = pid_task(file->pid, PIDTYPE_PID);
> - seq_printf(m, "%s: %u objects, %zu bytes (%zu active, %zu inactive, %zu global, %zu unbound)\n",
> + seq_printf(m, "%s: %u objects, %zu bytes (%zu active, %zu inactive, %zu global, %zu shared, %zu unbound)\n",
> task ? task->comm : "<unknown>",
> stats.count,
> stats.total,
> stats.active,
> stats.inactive,
> stats.global,
> + stats.shared,
> stats.unbound);
> rcu_read_unlock();
> }
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ben Widawsky, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-03-20 4:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 14:57 [PATCH 3/4] drm/i915: Per-process stats work better when evaluated per-process Rodrigo Vivi
2014-03-19 0:05 ` Ben Widawsky
2014-03-19 6:55 ` Chris Wilson
2014-03-19 13:45 ` [PATCH 1/2] " Chris Wilson
2014-03-19 13:45 ` [PATCH 2/2] drm/i915: Print how many objects are shared in per-process stats Chris Wilson
2014-03-20 4:42 ` Ben Widawsky [this message]
2014-03-20 7:40 ` [PATCH 2/2] drm/i915: Print how many objects are shared in per-process statsg Chris Wilson
2014-03-20 14:11 ` Daniel Vetter
2014-03-19 17:30 ` [PATCH 1/2] drm/i915: Per-process stats work better when evaluated per-process Ben Widawsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140320044248.GB1748@bwidawsk.net \
--to=ben@bwidawsk.net \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox