[PATCH v9 10/10] drm/amdgpu: update trace format to match gpu_scheduler_trace

Yadav, Arvind arvyadav at amd.com
Fri Apr 25 05:31:06 UTC 2025


Reviewed-by: Arvind Yadav <Arvind.Yadav at amd.com>

On 4/24/2025 2:08 PM, Pierre-Eric Pelloux-Prayer wrote:
> Log fences using the same format for coherency.
>
> Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
> Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 22 ++++++++++------------
>   1 file changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> index 4fd810cb5387..d13e64a69e25 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> @@ -168,8 +168,8 @@ TRACE_EVENT(amdgpu_cs_ioctl,
>   	    TP_ARGS(job),
>   	    TP_STRUCT__entry(
>   			     __string(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job))
> -			     __field(unsigned int, context)
> -			     __field(unsigned int, seqno)
> +			     __field(u64, context)
> +			     __field(u64, seqno)
>   			     __field(struct dma_fence *, fence)
>   			     __string(ring, to_amdgpu_ring(job->base.sched)->name)
>   			     __field(u32, num_ibs)
> @@ -182,7 +182,7 @@ TRACE_EVENT(amdgpu_cs_ioctl,
>   			   __assign_str(ring);
>   			   __entry->num_ibs = job->num_ibs;
>   			   ),
> -	    TP_printk("timeline=%s, context=%u, seqno=%u, ring_name=%s, num_ibs=%u",
> +	    TP_printk("timeline=%s, fence=%llu:%llu, ring_name=%s, num_ibs=%u",
>   		      __get_str(timeline), __entry->context,
>   		      __entry->seqno, __get_str(ring), __entry->num_ibs)
>   );
> @@ -192,8 +192,8 @@ TRACE_EVENT(amdgpu_sched_run_job,
>   	    TP_ARGS(job),
>   	    TP_STRUCT__entry(
>   			     __string(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job))
> -			     __field(unsigned int, context)
> -			     __field(unsigned int, seqno)
> +			     __field(u64, context)
> +			     __field(u64, seqno)
>   			     __string(ring, to_amdgpu_ring(job->base.sched)->name)
>   			     __field(u32, num_ibs)
>   			     ),
> @@ -205,7 +205,7 @@ TRACE_EVENT(amdgpu_sched_run_job,
>   			   __assign_str(ring);
>   			   __entry->num_ibs = job->num_ibs;
>   			   ),
> -	    TP_printk("timeline=%s, context=%u, seqno=%u, ring_name=%s, num_ibs=%u",
> +	    TP_printk("timeline=%s, fence=%llu:%llu, ring_name=%s, num_ibs=%u",
>   		      __get_str(timeline), __entry->context,
>   		      __entry->seqno, __get_str(ring), __entry->num_ibs)
>   );
> @@ -548,8 +548,8 @@ TRACE_EVENT(amdgpu_ib_pipe_sync,
>   	    TP_STRUCT__entry(
>   			     __string(ring, sched_job->base.sched->name)
>   			     __field(struct dma_fence *, fence)
> -			     __field(uint64_t, ctx)
> -			     __field(unsigned, seqno)
> +			     __field(u64, ctx)
> +			     __field(u64, seqno)
>   			     ),
>   
>   	    TP_fast_assign(
> @@ -558,10 +558,8 @@ TRACE_EVENT(amdgpu_ib_pipe_sync,
>   			   __entry->ctx = fence->context;
>   			   __entry->seqno = fence->seqno;
>   			   ),
> -	    TP_printk("job ring=%s need pipe sync to fence=%p, context=%llu, seq=%u",
> -		      __get_str(ring),
> -		      __entry->fence, __entry->ctx,
> -		      __entry->seqno)
> +	    TP_printk("job ring=%s need pipe sync to fence=%llu:%llu",
> +		      __get_str(ring), __entry->ctx, __entry->seqno)
>   );
>   
>   TRACE_EVENT(amdgpu_reset_reg_dumps,


More information about the amd-gfx mailing list