drm/amd/sched: print sched job id in amd_sched_job trace
Subsystems (2)
PATCH 1/1 drm/amd/sched: print sched job id in amd_sched_job trace
From: Nicolai Hähnle <[email protected]>
This makes it easier to correlate amd_sched_job with with other trace points that don't log the job pointer.
--- drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h +5 -2
@@ -12,36 +12,39 @@#define TRACE_INCLUDE_FILE gpu_sched_traceTRACE_EVENT (amd_sched_job, TP_PROTO(struct amd_sched_job *sched_job),TP_ARGS (sched_job),TP_STRUCT__entry ( __field(struct amd_sched_entity *, entity) __field(struct amd_sched_job *, sched_job) __field(struct dma_fence *, fence) __field(const char *, name) + __field(uint64_t, id) __field(u32, job_count)__field (int, hw_job_count) ),TP_fast_assign ( __entry->entity = sched_job->s_entity; __entry->sched_job = sched_job; + __entry->id = sched_job->id; __entry->fence = &sched_job->s_fence->finished; __entry->name = sched_job->sched->name; __entry->job_count = kfifo_len( &sched_job->s_entity->job_queue) / sizeof(sched_job); __entry->hw_job_count =atomic_read ( &sched_job->sched->hw_rq_count); ), -TP_printk ("entity=%p, sched job=%p, fence=%p, ring=%s, job count:%u, hw job count:%d" , - __entry->entity, __entry->sched_job, __entry->fence, __entry->name, +TP_printk ("entity=%p, sched job=%p, id=%llu, fence=%p, ring=%s, job count:%u, hw job count:%d" , + __entry->entity, __entry->sched_job, __entry->id, + __entry->fence, __entry->name, __entry->job_count, __entry->hw_job_count) ); TRACE_EVENT(amd_sched_process_job, TP_PROTO(struct amd_sched_fence *fence), TP_ARGS(fence), TP_STRUCT__entry( __field(struct dma_fence *, fence) ),
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20170613201441.21305-1-nhaehnle-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Andres Rodriguez
Reviewed-byQuoted 15 lines · Nicolai Hähnle
From: Nicolai Hähnle <[email protected]>
This makes it easier to correlate
amd_sched_jobwith with other trace points that don't log the job pointer.Signed-off-by Nicolai Hähnle <[email protected]>--- drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h +0
-0
drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h line 19
Quoted 8 lines
drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h +0
-0@@ -12,36 +12,39 @@#define TRACE_INCLUDE_FILE gpu_sched_trace TRACE_EVENT(amd_sched_job, TP_PROTO(struct amd_sched_job *sched_job), TP_ARGS(sched_job), TP_STRUCT__entry( __field(struct amd_sched_entity *, entity) __field(struct amd_sched_job *, sched_job)
Change looks good. One minor suggestion would be to get rid of the sched_job pointer altogether.
Since we have an id the sched_job* becomes superfluous, and it can lead to confusion if we hit the pointer re-use case. I think this is also the only trace that still prints the pointer, so it isn't actually very useful in the first place.
With that change you can add:
Regards,
Andres
Quoted 24 lines
drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h +5
-2__field(struct dma_fence *, fence) __field(const char *, name) + __field(uint64_t, id) __field(u32, job_count) __field(int, hw_job_count) ),TP_fast_assign ( __entry->entity = sched_job->s_entity; __entry->sched_job = sched_job; + __entry->id = sched_job->id; __entry->fence = &sched_job->s_fence->finished; __entry->name = sched_job->sched->name; __entry->job_count =kfifo_len ( &sched_job->s_entity->job_queue) /sizeof (sched_job); __entry->hw_job_count =atomic_read ( &sched_job->sched->hw_rq_count); ), - TP_printk("entity=%p, sched job=%p, fence=%p, ring=%s, job count:%u, hw job count:%d", - __entry->entity, __entry->sched_job, __entry->fence, __entry->name, + TP_printk("entity=%p, sched job=%p, id=%llu, fence=%p, ring=%s, job count:%u, hw job count:%d", + __entry->entity, __entry->sched_job, __entry->id, + __entry->fence, __entry->name,
drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h line 50
Quoted 10 lines
drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h +0
-0__entry->job_count, __entry->hw_job_count) ); TRACE_EVENT(amd_sched_process_job, TP_PROTO(struct amd_sched_fence *fence), TP_ARGS(fence), TP_STRUCT__entry( __field(struct dma_fence *, fence) ),
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx