[PATCH 1/2] drm/i915/gvt: Add set_ggtt_entry tracing event

Tina Zhang tina.zhang at intel.com
Mon May 20 05:36:48 UTC 2019


Add set_ggtt_entry tracing event.

Signed-off-by: Tina Zhang <tina.zhang at intel.com>
---
 drivers/gpu/drm/i915/gvt/gtt.c   |  1 +
 drivers/gpu/drm/i915/gvt/trace.h | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
index c2f7d20f6346..dcc207f04b75 100644
--- a/drivers/gpu/drm/i915/gvt/gtt.c
+++ b/drivers/gpu/drm/i915/gvt/gtt.c
@@ -629,6 +629,7 @@ static void ggtt_set_host_entry(struct intel_vgpu_mm *mm,
 	struct intel_gvt_gtt_pte_ops *pte_ops = mm->vgpu->gvt->gtt.pte_ops;
 
 	GEM_BUG_ON(mm->type != INTEL_GVT_MM_GGTT);
+	trace_set_ggtt_entry(mm->vgpu->id, entry->val64);
 
 	pte_ops->set_entry(NULL, entry, index, false, 0, mm->vgpu);
 }
diff --git a/drivers/gpu/drm/i915/gvt/trace.h b/drivers/gpu/drm/i915/gvt/trace.h
index 6d787750d279..69c374868146 100644
--- a/drivers/gpu/drm/i915/gvt/trace.h
+++ b/drivers/gpu/drm/i915/gvt/trace.h
@@ -373,6 +373,25 @@ TRACE_EVENT(render_mmio,
 		  __entry->old_val, __entry->new_val)
 );
 
+TRACE_EVENT(set_ggtt_entry,
+	TP_PROTO(int id, unsigned long address),
+
+	TP_ARGS(id, address),
+
+	TP_STRUCT__entry(
+		__field(int, id)
+		__field(unsigned long, address)
+	),
+
+	TP_fast_assign(
+		__entry->id = id;
+		__entry->address = address;
+	),
+
+	TP_printk("vgpu%d:set ggtt entry 0x%lx \n",
+		  __entry->id, __entry->address)
+);
+
 #endif /* _GVT_TRACE_H_ */
 
 /* This part must be out of protection */
-- 
2.17.1



More information about the intel-gvt-dev mailing list