Skip to content

Commit 02ba754

Browse files
ChristianKoenigAMDalexdeucher
authored andcommitted
drm/amdgpu: add cleaner shader trace point
Note when the cleaner shader is executed. Signed-off-by: Christian König <[email protected]> Acked-by: Srinivasan Shanmugam <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 1bb1314 commit 02ba754

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,21 @@ TRACE_EVENT(amdgpu_isolation,
474474
__entry->next)
475475
);
476476

477+
TRACE_EVENT(amdgpu_cleaner_shader,
478+
TP_PROTO(struct amdgpu_ring *ring, struct dma_fence *fence),
479+
TP_ARGS(ring, fence),
480+
TP_STRUCT__entry(
481+
__string(ring, ring->name)
482+
__field(u64, seqno)
483+
),
484+
485+
TP_fast_assign(
486+
__assign_str(ring);
487+
__entry->seqno = fence->seqno;
488+
),
489+
TP_printk("ring=%s, seqno=%Lu", __get_str(ring), __entry->seqno)
490+
);
491+
477492
TRACE_EVENT(amdgpu_bo_list_set,
478493
TP_PROTO(struct amdgpu_bo_list *list, struct amdgpu_bo *bo),
479494
TP_ARGS(list, bo),

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
853853
* finish before we push them to the HW.
854854
*/
855855
if (cleaner_shader_needed) {
856+
trace_amdgpu_cleaner_shader(ring, fence);
856857
mutex_lock(&adev->enforce_isolation_mutex);
857858
dma_fence_put(isolation->spearhead);
858859
isolation->spearhead = dma_fence_get(fence);

0 commit comments

Comments
 (0)