From: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx> The context used to execute a batchbuffer is becoming increasingly important. Duplicating to avoid modifications to the original trace. Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 ++ drivers/gpu/drm/i915/i915_trace.h | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 60998fc..6b0dd9f 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -1174,6 +1174,8 @@ legacy_ringbuffer_submission(struct drm_device *dev, struct drm_file *file, } trace_i915_gem_ring_dispatch(ring, intel_ring_get_seqno(ring), flags); + trace_i915_gem_ring_dispatch_validation(ring, + intel_ring_get_seqno(ring), flags, ctx); i915_gem_execbuffer_move_to_active(vmas, ring); i915_gem_execbuffer_retire_commands(dev, file, ring, batch_obj); diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h index 9be1421..d639d6c 100644 --- a/drivers/gpu/drm/i915/i915_trace.h +++ b/drivers/gpu/drm/i915/i915_trace.h @@ -374,6 +374,33 @@ TRACE_EVENT(i915_gem_ring_dispatch, __entry->dev, __entry->ring, __entry->seqno, __entry->flags) ); +TRACE_EVENT(i915_gem_ring_dispatch_validation, + TP_PROTO(struct intel_engine_cs *ring, u32 seqno, u32 flags, + struct intel_context *ctx), + TP_ARGS(ring, seqno, flags, ctx), + + TP_STRUCT__entry( + __field(u32, dev) + __field(u32, ring) + __field(u32, seqno) + __field(u32, flags) + __field(struct i915_address_space *, vm) + ), + + TP_fast_assign( + __entry->dev = ring->dev->primary->index; + __entry->ring = ring->id; + __entry->seqno = seqno; + __entry->flags = flags; + __entry->vm = ctx->vm; + i915_trace_irq_get(ring, seqno); + ), + + TP_printk("dev=%u, ring=%u, seqno=%u, flags=%x, vm=%p", + __entry->dev, __entry->ring, __entry->seqno, + __entry->flags, __entry->vm) +); + TRACE_EVENT(i915_gem_ring_flush, TP_PROTO(struct intel_engine_cs *ring, u32 invalidate, u32 flush), TP_ARGS(ring, invalidate, flush), -- 1.8.5.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx