[RFC,1/8] drm/i915/tracepoints: Tidy request event class

Submitted by Tvrtko Ursulin on Jan. 27, 2017, 12:01 p.m.

Details

Message ID 1485518487-4464-2-git-send-email-tvrtko.ursulin@linux.intel.com
State Accepted
Commit e235b53019a3d1225601d535795f9a4f7f44587b
Headers show
Series "Tracepoints cleanup and improvements for requests" ( rev: 5 4 3 2 1 ) in Intel GFX

Browsing this patch as part of:
"Tracepoints cleanup and improvements for requests" rev 3 in Intel GFX
<< prev patch [1/8] next patch >>

Commit Message

Tvrtko Ursulin Jan. 27, 2017, 12:01 p.m.
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

At the moment only the global seqno is logged which is not set
until the request is ready for submission.

Add the per-contex seqno and the context hardware id which are
both interesting data points.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_trace.h | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index 4461df5a94fe..d890e4b03902 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -555,18 +555,23 @@  DECLARE_EVENT_CLASS(i915_gem_request,
 
 	    TP_STRUCT__entry(
 			     __field(u32, dev)
+			     __field(u32, ctx)
 			     __field(u32, ring)
 			     __field(u32, seqno)
+			     __field(u32, global)
 			     ),
 
 	    TP_fast_assign(
 			   __entry->dev = req->i915->drm.primary->index;
+			   __entry->ctx = req->ctx->hw_id;
 			   __entry->ring = req->engine->id;
-			   __entry->seqno = req->global_seqno;
+			   __entry->seqno = req->fence.seqno;
+			   __entry->global = req->global_seqno;
 			   ),
 
-	    TP_printk("dev=%u, ring=%u, seqno=%u",
-		      __entry->dev, __entry->ring, __entry->seqno)
+	    TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u",
+		      __entry->dev, __entry->ring, __entry->ctx, __entry->seqno,
+		      __entry->global)
 );
 
 DEFINE_EVENT(i915_gem_request, i915_gem_request_add,