[PATCH] drm/xe: Add gt_id to xe_sched_job traces

Matthew Brost matthew.brost at intel.com
Thu Nov 7 06:48:07 UTC 2024


On Wed, Nov 06, 2024 at 10:06:06PM -0800, Lucas De Marchi wrote:
> In order to uniquely identify the jobs, xe_sched_job tracepoints need
> to have the tuple (gt_id, guc_id). Find a "hole" where the next entry is
> unaligned and add one more field.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>

Reviewed-by: Matthew Brost <matthew.brost at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_trace.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_trace.h b/drivers/gpu/drm/xe/xe_trace.h
> index 91130ad8999cd..de682978c4bfb 100644
> --- a/drivers/gpu/drm/xe/xe_trace.h
> +++ b/drivers/gpu/drm/xe/xe_trace.h
> @@ -211,6 +211,7 @@ DECLARE_EVENT_CLASS(xe_sched_job,
>  			     __string(dev, __dev_name_eq(job->q))
>  			     __field(u32, seqno)
>  			     __field(u32, lrc_seqno)
> +			     __field(u8, gt_id)
>  			     __field(u16, guc_id)
>  			     __field(u32, guc_state)
>  			     __field(u32, flags)
> @@ -223,6 +224,7 @@ DECLARE_EVENT_CLASS(xe_sched_job,
>  			   __assign_str(dev);
>  			   __entry->seqno = xe_sched_job_seqno(job);
>  			   __entry->lrc_seqno = xe_sched_job_lrc_seqno(job);
> +			   __entry->gt_id = job->q->gt->info.id;
>  			   __entry->guc_id = job->q->guc->id;
>  			   __entry->guc_state =
>  			   atomic_read(&job->q->guc->state);
> @@ -232,9 +234,9 @@ DECLARE_EVENT_CLASS(xe_sched_job,
>  			   __entry->batch_addr = (u64)job->ptrs[0].batch_addr;
>  			   ),
>  
> -		    TP_printk("dev=%s, fence=%p, seqno=%u, lrc_seqno=%u, guc_id=%d, batch_addr=0x%012llx, guc_state=0x%x, flags=0x%x, error=%d",
> +		    TP_printk("dev=%s, fence=%p, seqno=%u, lrc_seqno=%u, gt=%u, guc_id=%d, batch_addr=0x%012llx, guc_state=0x%x, flags=0x%x, error=%d",
>  			      __get_str(dev), __entry->fence, __entry->seqno,
> -			      __entry->lrc_seqno, __entry->guc_id,
> +			      __entry->lrc_seqno, __entry->gt_id, __entry->guc_id,
>  			      __entry->batch_addr, __entry->guc_state,
>  			      __entry->flags, __entry->error)
>  );
> -- 
> 2.47.0
> 


More information about the Intel-xe mailing list