From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 02/29] drm/i915: Show (count, size) of purgeable objects in i915_gem_objects Date: Mon, 20 Aug 2012 11:04:52 +0200 Message-ID: <20120820090452.GA5170@phenom.ffwll.local> References: <1344696088-24760-1-git-send-email-chris@chris-wilson.co.uk> <1344696088-24760-3-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 132DF9EC8B for ; Mon, 20 Aug 2012 02:04:33 -0700 (PDT) Received: by eekc13 with SMTP id c13so1395761eek.36 for ; Mon, 20 Aug 2012 02:04:33 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1344696088-24760-3-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sat, Aug 11, 2012 at 03:41:01PM +0100, Chris Wilson wrote: > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i915_debugfs.c | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > index a7eb093..16e8701 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -197,8 +197,8 @@ static int i915_gem_object_info(struct seq_file *m, void* data) > struct drm_info_node *node = (struct drm_info_node *) m->private; > struct drm_device *dev = node->minor->dev; > struct drm_i915_private *dev_priv = dev->dev_private; > - u32 count, mappable_count; > - size_t size, mappable_size; > + u32 count, mappable_count, purgeable_count; > + size_t size, mappable_size, purgeable_size; > struct drm_i915_gem_object *obj; > int ret; > > @@ -225,9 +225,12 @@ static int i915_gem_object_info(struct seq_file *m, void* data) > seq_printf(m, " %u [%u] inactive objects, %zu [%zu] bytes\n", > count, mappable_count, size, mappable_size); > > - size = count = 0; > - list_for_each_entry(obj, &dev_priv->mm.unbound_list, gtt_list) > + size = count = purgeable_size = purgeable_count = 0; > + list_for_each_entry(obj, &dev_priv->mm.unbound_list, gtt_list) { > size += obj->base.size, ++count; > + if (obj->madv == I915_MADV_DONTNEED) > + purgeable_size += obj->base.size, ++purgeable_count; > + } > seq_printf(m, "%u unbound objects, %zu bytes\n", count, size); > > size = count = mappable_size = mappable_count = 0; > @@ -237,10 +240,16 @@ static int i915_gem_object_info(struct seq_file *m, void* data) > ++count; > } > if (obj->pin_mappable) { > - mappable_size += obj->gtt_space->size; > + mappable_size += obj->gtt_space->size, That s/;/,/ here looks fishy. Shall I kill it when applying? -Daniel > ++mappable_count; > } > + if (obj->madv == I915_MADV_DONTNEED) { > + purgeable_size += obj->base.size; > + ++purgeable_count; > + } > } > + seq_printf(m, "%u purgeable objects, %zu bytes\n", > + purgeable_count, purgeable_size); > seq_printf(m, "%u pinned mappable objects, %zu bytes\n", > mappable_count, mappable_size); > seq_printf(m, "%u fault mappable objects, %zu bytes\n", > -- > 1.7.10.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48