[Intel-gfx] [PATCH] Implement batch and ring buffer dumping

Ben Gamari bgamari at gmail.com
Fri Feb 13 20:50:59 CET 2009


Yeah, that's a really good idea. I'll code that up this afternoon.
Also, Eric, have you had a chance to look at the debugfs/seq_file
changes (no pressure)? It looked like some of your patches, Chris,
exposed more through procfs. You might want to consider rebasing on
top of my procfs rework as it makes proc output far simpler. Just a
thought.

- Ben


On Fri, Feb 13, 2009 at 1:57 PM, Eric Anholt <eric at anholt.net> wrote:
> On Fri, 2009-02-13 at 09:31 +0000, Chris Wilson wrote:
>> On Tue, 2009-02-03 at 17:06 -0500, Ben Gamari wrote:
>> > ---
>> >  drivers/gpu/drm/i915/i915_drv.h         |   14 ++++
>> >  drivers/gpu/drm/i915/i915_gem.c         |   17 +++---
>> >  drivers/gpu/drm/i915/i915_gem_debugfs.c |  102 +++++++++++++++++++++++++++++++
>> >  3 files changed, 125 insertions(+), 8 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
>> > index f8abc79..53e169c 100644
>> > --- a/drivers/gpu/drm/i915/i915_drv.h
>> > +++ b/drivers/gpu/drm/i915/i915_drv.h
>> > @@ -374,6 +374,15 @@ typedef struct drm_i915_private {
>> >
>> >             /* storage for physical objects */
>> >             struct drm_i915_gem_phys_object *phys_objs[I915_MAX_PHYS_OBJECT];
>> > +
>> > +           /**
>> > +            * Ring buffer for recently submitted batch buffer objects
>> > +            * This is for keeping track of batch buffers referenced while
>> > +            * dumping the ring buffer
>> > +            */
>> > +#define I915_GEM_RECENT_BATCH_LEN 10
>> > +           struct drm_gem_object *recent_batch_list[I915_GEM_RECENT_BATCH_LEN];
>> > +           int recent_batch_head;
>> >     } mm;
>> >  } drm_i915_private_t;
>>
>> When I used this in anger, the problem I encountered was that storing
>> the last 10 *submitted* batches was not enough to cache the currently
>> executing batch buffer. Can I suggest that instead of maintaining a ring
>> of recently submitted batches, we just dump the contents of any buffer
>> in the active list that has COMMAND_DOMAIN in its read_domains? Just a
>> single file under /dri and include a single line header to mark the
>> boundaries of each buffer.
>
> I like this plan.  Way better than what I suggested.
>
> --
> Eric Anholt
> eric at anholt.net                         eric.anholt at intel.com
>
>
>



More information about the Intel-gfx mailing list