[PATCH] drm/imagination: Add job type info to pvr_job_submit_fw trace event

Brajesh Gupta posted 1 patch 1 month, 1 week ago
There is a newer version of this series
drivers/gpu/drm/imagination/pvr_trace.h | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
[PATCH] drm/imagination: Add job type info to pvr_job_submit_fw trace event
Posted by Brajesh Gupta 1 month, 1 week ago
Update trace event pvr_job_submit_fw to additionally capture and display
type of the submitted job to easily map events as per type.

Signed-off-by: Brajesh Gupta <brajesh.gupta@imgtec.com>
---
 drivers/gpu/drm/imagination/pvr_trace.h | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/imagination/pvr_trace.h b/drivers/gpu/drm/imagination/pvr_trace.h
index ffbbde3b2bcc..1b449a64a6ac 100644
--- a/drivers/gpu/drm/imagination/pvr_trace.h
+++ b/drivers/gpu/drm/imagination/pvr_trace.h
@@ -81,20 +81,23 @@ TRACE_EVENT(pvr_job_create,
 		      __entry->sync_op_count)
 );
 
-#undef PVR_JOB_TYPE_TO_STR
-
 TRACE_EVENT(pvr_job_submit_fw,
 	    TP_PROTO(struct pvr_job *job),
 	    TP_ARGS(job),
 	    TP_STRUCT__entry(__field(struct pvr_job *, job)
-			     __field(u32, done_seqno)),
+			     __field(u32, done_seqno)
+			     __field(enum drm_pvr_job_type, job_type)),
 	    TP_fast_assign(__entry->job = job;
-			   __entry->done_seqno = job->done_fence->seqno;),
-	    TP_printk("job=%p done_seqno=%u",
+			   __entry->done_seqno = job->done_fence->seqno;
+			   __entry->job_type = job->type;),
+	    TP_printk("job=%p done_seqno=%u job_type=%s",
 		      __entry->job,
-		      __entry->done_seqno)
+		      __entry->done_seqno,
+		      PVR_JOB_TYPE_TO_STR(__entry->job_type))
 );
 
+#undef PVR_JOB_TYPE_TO_STR
+
 TRACE_EVENT(pvr_job_done,
 	    TP_PROTO(struct pvr_job *job),
 	    TP_ARGS(job),

---
base-commit: e55fead22ff9ee047ab9f1903860c4b43043514e
change-id: 20260819-b4-submitjob_tracepoint-d374f065345e

Best regards,
-- 
Brajesh Gupta <brajesh.gupta@imgtec.com>
Re: [PATCH] drm/imagination: Add job type info to pvr_job_submit_fw trace event
Posted by Alessio Belle 2 weeks ago
Hi Brajesh,

On Wed, 2026-08-19 at 13:53 +0530, Brajesh Gupta wrote:
> Update trace event pvr_job_submit_fw to additionally capture and display
> type of the submitted job to easily map events as per type.
> 
> Signed-off-by: Brajesh Gupta <brajesh.gupta@imgtec.com>
> ---
>  drivers/gpu/drm/imagination/pvr_trace.h | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imagination/pvr_trace.h b/drivers/gpu/drm/imagination/pvr_trace.h
> index ffbbde3b2bcc..1b449a64a6ac 100644
> --- a/drivers/gpu/drm/imagination/pvr_trace.h
> +++ b/drivers/gpu/drm/imagination/pvr_trace.h
> @@ -81,20 +81,23 @@ TRACE_EVENT(pvr_job_create,
>  		      __entry->sync_op_count)
>  );
>  
> -#undef PVR_JOB_TYPE_TO_STR
> -

There is a minor conflict here on drm-misc-next since a fix touching these lines
from drm-misc-fixes was merged back into it. Could you rebase this patch on top
of a more recent drm-misc-next?

The rest LGTM and works locally so with that sorted,

Reviewed-by: Alessio Belle <alessio.belle@imgtec.com>

Thanks,
Alessio

>  TRACE_EVENT(pvr_job_submit_fw,
>  	    TP_PROTO(struct pvr_job *job),
>  	    TP_ARGS(job),
>  	    TP_STRUCT__entry(__field(struct pvr_job *, job)
> -			     __field(u32, done_seqno)),
> +			     __field(u32, done_seqno)
> +			     __field(enum drm_pvr_job_type, job_type)),
>  	    TP_fast_assign(__entry->job = job;
> -			   __entry->done_seqno = job->done_fence->seqno;),
> -	    TP_printk("job=%p done_seqno=%u",
> +			   __entry->done_seqno = job->done_fence->seqno;
> +			   __entry->job_type = job->type;),
> +	    TP_printk("job=%p done_seqno=%u job_type=%s",
>  		      __entry->job,
> -		      __entry->done_seqno)
> +		      __entry->done_seqno,
> +		      PVR_JOB_TYPE_TO_STR(__entry->job_type))
>  );
>  
> +#undef PVR_JOB_TYPE_TO_STR
> +
>  TRACE_EVENT(pvr_job_done,
>  	    TP_PROTO(struct pvr_job *job),
>  	    TP_ARGS(job),
> 
> ---
> base-commit: e55fead22ff9ee047ab9f1903860c4b43043514e
> change-id: 20260819-b4-submitjob_tracepoint-d374f065345e
> 
> Best regards,