[PATCH 10/11] drm/xe: Add GT TLB coalesce tracepoints
Matthew Brost
matthew.brost at intel.com
Sat Jul 6 00:02:51 UTC 2024
Add visibility to GT TLB coalescing.
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 10 +++++++++-
drivers/gpu/drm/xe/xe_trace.h | 10 ++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
index b85089d27a36..c7634acea938 100644
--- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
+++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
@@ -362,7 +362,8 @@ xe_gt_tlb_invalidation_coalesce_issue(struct xe_gt *gt,
list_for_each_entry(fence, &coalesce->fence_list, link) {
fence->seqno = seqno;
fence->invalidation_time = ktime_get();
- trace_xe_gt_tlb_invalidation_fence_send(gt_to_xe(gt), fence);
+ trace_xe_gt_tlb_invalidation_fence_send_coalesce(gt_to_xe(gt),
+ fence);
}
spin_lock_irq(>->tlb_invalidation.pending_lock);
@@ -411,6 +412,8 @@ xe_gt_tlb_invalidation_coalesce_prep(struct xe_gt *gt,
goto unlock;
}
+ trace_xe_gt_tlb_invalidation_fence_coalesce(gt_to_xe(gt), fence);
+
if (list_empty(&coalesce->link))
list_add_tail(&coalesce->link,
>->tlb_invalidation.pending_coalesce);
@@ -469,6 +472,9 @@ int xe_gt_tlb_invalidation_ggtt(struct xe_gt *gt,
{
struct xe_device *xe = gt_to_xe(gt);
+ xe_gt_assert(gt, coalesce);
+ xe_gt_assert(gt, coalesce->type == XE_GT_TLB_INVALIDATION_COALESCE_GGTT);
+
if (xe_guc_ct_enabled(>->uc.guc.ct) &&
gt->uc.guc.submission_state.enabled) {
struct xe_gt_tlb_invalidation_fence fence;
@@ -527,6 +533,8 @@ int xe_gt_tlb_invalidation_range(struct xe_gt *gt,
int ret = 0;
xe_gt_assert(gt, fence);
+ xe_gt_assert(gt, coalesce);
+ xe_gt_assert(gt, coalesce->type == XE_GT_TLB_INVALIDATION_COALESCE_PPGTT);
mutex_lock(>->tlb_invalidation.seqno_lock);
diff --git a/drivers/gpu/drm/xe/xe_trace.h b/drivers/gpu/drm/xe/xe_trace.h
index 09ca1ad057b0..e2c5af5a1d23 100644
--- a/drivers/gpu/drm/xe/xe_trace.h
+++ b/drivers/gpu/drm/xe/xe_trace.h
@@ -60,11 +60,21 @@ DEFINE_EVENT(xe_gt_tlb_invalidation_fence, xe_gt_tlb_invalidation_fence_cb,
TP_ARGS(xe, fence)
);
+DEFINE_EVENT(xe_gt_tlb_invalidation_fence, xe_gt_tlb_invalidation_fence_coalesce,
+ TP_PROTO(struct xe_device *xe, struct xe_gt_tlb_invalidation_fence *fence),
+ TP_ARGS(xe, fence)
+);
+
DEFINE_EVENT(xe_gt_tlb_invalidation_fence, xe_gt_tlb_invalidation_fence_send,
TP_PROTO(struct xe_device *xe, struct xe_gt_tlb_invalidation_fence *fence),
TP_ARGS(xe, fence)
);
+DEFINE_EVENT(xe_gt_tlb_invalidation_fence, xe_gt_tlb_invalidation_fence_send_coalesce,
+ TP_PROTO(struct xe_device *xe, struct xe_gt_tlb_invalidation_fence *fence),
+ TP_ARGS(xe, fence)
+);
+
DEFINE_EVENT(xe_gt_tlb_invalidation_fence, xe_gt_tlb_invalidation_fence_recv,
TP_PROTO(struct xe_device *xe, struct xe_gt_tlb_invalidation_fence *fence),
TP_ARGS(xe, fence)
--
2.34.1
More information about the Intel-xe
mailing list