Skip to content

Commit 7a97574

Browse files
committed
drm/xe: Use pointers in trace events
Commit a0df2cc ("drm/xe/xe_bo_move: Enhance xe_bo_move trace") inadvertently reverted commit 8d038f4 ("drm/xe: Fix cast on trace variable"), breaking the build on 32bits. As noted by Ville, there's no point in converting the pointers to u64 and add casts everywhere. In fact, it's better to just use %p and let the address be hashed. Convert all the cases in xe_trace.h to use pointers. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Priyanka Dandamudi <priyanka.dandamudi@intel.com> Cc: Oak Zeng <oak.zeng@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240222144125.2862546-1-lucas.demarchi@intel.com
1 parent a24d909 commit 7a97574

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

drivers/gpu/drm/xe/xe_trace.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ DECLARE_EVENT_CLASS(xe_gt_tlb_invalidation_fence,
2727
TP_ARGS(fence),
2828

2929
TP_STRUCT__entry(
30-
__field(u64, fence)
30+
__field(struct xe_gt_tlb_invalidation_fence *, fence)
3131
__field(int, seqno)
3232
),
3333

3434
TP_fast_assign(
35-
__entry->fence = (u64)fence;
35+
__entry->fence = fence;
3636
__entry->seqno = fence->seqno;
3737
),
3838

39-
TP_printk("fence=0x%016llx, seqno=%d",
39+
TP_printk("fence=%p, seqno=%d",
4040
__entry->fence, __entry->seqno)
4141
);
4242

@@ -83,16 +83,16 @@ DECLARE_EVENT_CLASS(xe_bo,
8383
TP_STRUCT__entry(
8484
__field(size_t, size)
8585
__field(u32, flags)
86-
__field(u64, vm)
86+
__field(struct xe_vm *, vm)
8787
),
8888

8989
TP_fast_assign(
9090
__entry->size = bo->size;
9191
__entry->flags = bo->flags;
92-
__entry->vm = (unsigned long)bo->vm;
92+
__entry->vm = bo->vm;
9393
),
9494

95-
TP_printk("size=%zu, flags=0x%02x, vm=0x%016llx",
95+
TP_printk("size=%zu, flags=0x%02x, vm=%p",
9696
__entry->size, __entry->flags, __entry->vm)
9797
);
9898

@@ -346,16 +346,16 @@ DECLARE_EVENT_CLASS(xe_hw_fence,
346346
TP_STRUCT__entry(
347347
__field(u64, ctx)
348348
__field(u32, seqno)
349-
__field(u64, fence)
349+
__field(struct xe_hw_fence *, fence)
350350
),
351351

352352
TP_fast_assign(
353353
__entry->ctx = fence->dma.context;
354354
__entry->seqno = fence->dma.seqno;
355-
__entry->fence = (unsigned long)fence;
355+
__entry->fence = fence;
356356
),
357357

358-
TP_printk("ctx=0x%016llx, fence=0x%016llx, seqno=%u",
358+
TP_printk("ctx=0x%016llx, fence=%p, seqno=%u",
359359
__entry->ctx, __entry->fence, __entry->seqno)
360360
);
361361

@@ -384,22 +384,22 @@ DECLARE_EVENT_CLASS(xe_vma,
384384
TP_ARGS(vma),
385385

386386
TP_STRUCT__entry(
387-
__field(u64, vma)
387+
__field(struct xe_vma *, vma)
388388
__field(u32, asid)
389389
__field(u64, start)
390390
__field(u64, end)
391391
__field(u64, ptr)
392392
),
393393

394394
TP_fast_assign(
395-
__entry->vma = (unsigned long)vma;
395+
__entry->vma = vma;
396396
__entry->asid = xe_vma_vm(vma)->usm.asid;
397397
__entry->start = xe_vma_start(vma);
398398
__entry->end = xe_vma_end(vma) - 1;
399399
__entry->ptr = xe_vma_userptr(vma);
400400
),
401401

402-
TP_printk("vma=0x%016llx, asid=0x%05x, start=0x%012llx, end=0x%012llx, ptr=0x%012llx,",
402+
TP_printk("vma=%p, asid=0x%05x, start=0x%012llx, end=0x%012llx, userptr=0x%012llx,",
403403
__entry->vma, __entry->asid, __entry->start,
404404
__entry->end, __entry->ptr)
405405
)
@@ -484,16 +484,16 @@ DECLARE_EVENT_CLASS(xe_vm,
484484
TP_ARGS(vm),
485485

486486
TP_STRUCT__entry(
487-
__field(u64, vm)
487+
__field(struct xe_vm *, vm)
488488
__field(u32, asid)
489489
),
490490

491491
TP_fast_assign(
492-
__entry->vm = (unsigned long)vm;
492+
__entry->vm = vm;
493493
__entry->asid = vm->usm.asid;
494494
),
495495

496-
TP_printk("vm=0x%016llx, asid=0x%05x", __entry->vm,
496+
TP_printk("vm=%p, asid=0x%05x", __entry->vm,
497497
__entry->asid)
498498
);
499499

0 commit comments

Comments
 (0)