[Intel-gfx] [PATCH] drm/i915: Track clients and print their object usage in debugfs
Daniel Vetter
daniel at ffwll.ch
Thu Jun 6 10:46:35 CEST 2013
On Tue, Jun 04, 2013 at 04:24:48PM -0700, Ben Widawsky wrote:
> On Tue, Jun 04, 2013 at 11:49:08PM +0100, Chris Wilson wrote:
> > By stashing a pointer of who opened the device and keeping a list of
> > open fd, we can then walk each client and inspect how many objects they
> > have open. For example,
> >
> > i915_gem_objects:
> > 1102 objects, 613646336 bytes
> > 663 [662] objects, 468783104 [468750336] bytes in gtt
> > 37 [37] active objects, 46874624 [46874624] bytes
> > 626 [625] inactive objects, 421908480 [421875712] bytes
> > 282 unbound objects, 6512640 bytes
> > 85 purgeable objects, 6787072 bytes
> > 28 pinned mappable objects, 3686400 bytes
> > 40 fault mappable objects, 27783168 bytes
> > 2145386496 [536870912] gtt total
> >
> > Xorg: 43 objects, 32243712 bytes (10223616 active, 16683008 inactive, 4096 unbound)
> > gnome-shell: 30 objects, 28381184 bytes (0 active, 28336128 inactive, 0 unbound)
> > xonotic-linux64: 1032 objects, 569933824 bytes (46874624 active, 383545344 inactive, 6508544 unbound)
> >
> > v2: Use existing drm->filelist as pointed out by Ben.
> > v3: Not even stashing the task_struct is required as Ben pointed out
> > drm_file->pid.
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Reviewed-by: Ben Widawsky <ben at bwidawsk.net>
Queued for -next, thanks for the patch. Also, I'll make a mental note that
dev->struct_mutex seems to protect even more than what I've expected ;-)
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list