Skip to content

Commit 22b1a53

Browse files
zengshanjunhghimira
authored andcommitted
drm/xe: Print vm parameter in xe_vma trace
Print the vm that the vma belongs to in the vma trace. This is useful to correlate VMA operations to the VM. Signed-off-by: Oak Zeng <oak.zeng@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241218164833.2364049-4-oak.zeng@intel.com Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
1 parent 861b275 commit 22b1a53

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/gpu/drm/xe/xe_trace_bo.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ DECLARE_EVENT_CLASS(xe_vma,
9292
TP_STRUCT__entry(
9393
__string(dev, __dev_name_vma(vma))
9494
__field(struct xe_vma *, vma)
95+
__field(struct xe_vm *, vm)
9596
__field(u32, asid)
9697
__field(u64, start)
9798
__field(u64, end)
@@ -101,14 +102,16 @@ DECLARE_EVENT_CLASS(xe_vma,
101102
TP_fast_assign(
102103
__assign_str(dev);
103104
__entry->vma = vma;
105+
__entry->vm = xe_vma_vm(vma);
104106
__entry->asid = xe_vma_vm(vma)->usm.asid;
105107
__entry->start = xe_vma_start(vma);
106108
__entry->end = xe_vma_end(vma) - 1;
107109
__entry->ptr = xe_vma_userptr(vma);
108110
),
109111

110-
TP_printk("dev=%s, vma=%p, asid=0x%05x, start=0x%012llx, end=0x%012llx, userptr=0x%012llx,",
111-
__get_str(dev), __entry->vma, __entry->asid, __entry->start,
112+
TP_printk("dev=%s, vma=%p, vm=%p, asid=0x%05x, start=0x%012llx, end=0x%012llx, userptr=0x%012llx",
113+
__get_str(dev), __entry->vma, __entry->vm,
114+
__entry->asid, __entry->start,
112115
__entry->end, __entry->ptr)
113116
)
114117

0 commit comments

Comments
 (0)