AMD General

Since the caller can be collected by stacktrace trigger and further parsed by 
tool lib, so drop this change.

Regards,
      Prike

> -----Original Message-----
> From: Liang, Prike <[email protected]>
> Sent: Wednesday, August 26, 2026 2:17 PM
> To: [email protected]
> Cc: Deucher, Alexander <[email protected]>; Koenig, Christian
> <[email protected]>; Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux-
> [email protected]>; Liang, Prike <[email protected]>
> Subject: [PATCH] drm/amdgpu: Print caller in amdgpu_userq_state_changed
> tracepoint
>
> Since `amdgpu_userq_state_changed()` is invoked across multiple state 
> transition
> paths in the userq lifecycle (e.g., creation, eviction, restore, and 
> destroy), logging the
> caller makes it significantly easier to trace the exact call sequence when 
> debugging
> ftrace outputs.
>
> Signed-off-by: Prike Liang <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> index 5324030a13f5..569e1e38704c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> @@ -721,15 +721,18 @@ TRACE_EVENT(amdgpu_userq_state_changed,
>                            __field(u64, client_id)
>                            __field(u32, queue_type)
>                            __field(u32, to)
> +                          __field(void *, caller)
>                            ),
>           TP_fast_assign(
>                          __entry->doorbell_index = queue->doorbell_index;
>                          __entry->queue_type = queue->queue_type;
>                          __entry->client_id = 
> queue->userq_mgr->file->client_id;
>                          __entry->to = new_state;
> +                        __entry->caller = (void *)_RET_IP_;
>                          ),
> -         TP_printk("client_id=%llu, type=%u, doorbell=%llu, to=%d",
> -                   __entry->client_id, __entry->queue_type, __entry-
> >doorbell_index, __entry->to)
> +         TP_printk("client_id=%llu, type=%u, doorbell=%llu, to=%d 
> caller:%pS",
> +                   __entry->client_id, __entry->queue_type, __entry-
> >doorbell_index,
> +                   __entry->to, __entry->caller)
>  );
>
>  #undef AMDGPU_JOB_GET_TIMELINE_NAME
> --
> 2.34.1

Reply via email to