[PATCH 3/3] drm/xe: Print vm parameter in xe_vma trace
Ghimiray, Himal Prasad
himal.prasad.ghimiray at intel.com
Mon Dec 23 10:26:21 UTC 2024
On 18-12-2024 22:18, Oak Zeng wrote:
> 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 at intel.com>
> Reviewed-by: Matthew Brost <matthew.brost at intel.com>
> ---
> drivers/gpu/drm/xe/xe_trace_bo.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_trace_bo.h b/drivers/gpu/drm/xe/xe_trace_bo.h
> index a46f7cfd92c6f..ce4d0d7e81017 100644
> --- a/drivers/gpu/drm/xe/xe_trace_bo.h
> +++ b/drivers/gpu/drm/xe/xe_trace_bo.h
> @@ -92,6 +92,7 @@ DECLARE_EVENT_CLASS(xe_vma,
> TP_STRUCT__entry(
> __string(dev, __dev_name_vma(vma))
> __field(struct xe_vma *, vma)
> + __field(struct xe_vm *, vm)
> __field(u32, asid)
> __field(u64, start)
> __field(u64, end)
> @@ -101,14 +102,16 @@ DECLARE_EVENT_CLASS(xe_vma,
> TP_fast_assign(
> __assign_str(dev);
> __entry->vma = vma;
> + __entry->vm = xe_vma_vm(vma);
> __entry->asid = xe_vma_vm(vma)->usm.asid;
> __entry->start = xe_vma_start(vma);
> __entry->end = xe_vma_end(vma) - 1;
> __entry->ptr = xe_vma_userptr(vma);
> ),
>
> - TP_printk("dev=%s, vma=%p, asid=0x%05x, start=0x%012llx, end=0x%012llx, userptr=0x%012llx,",
> - __get_str(dev), __entry->vma, __entry->asid, __entry->start,
> + TP_printk("dev=%s, vma=%p, vm=%p, asid=0x%05x, start=0x%012llx, end=0x%012llx, userptr=0x%012llx",
> + __get_str(dev), __entry->vma, __entry->vm,
> + __entry->asid, __entry->start,
Looks good.
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
> __entry->end, __entry->ptr)
> )
>
More information about the Intel-xe
mailing list