]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amdgpu: add isolation trace point
authorChristian König <christian.koenig@amd.com>
Thu, 6 Feb 2025 13:16:06 +0000 (14:16 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Mar 2025 16:16:34 +0000 (12:16 -0400)
Note when we switch from one isolation owner to another.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h

index 662c83d72509ea223f5bbe0e34e6d2a1fefd3db5..6ebf6179064b72b3a938b53ef59010a2922be0fa 100644 (file)
@@ -7028,6 +7028,7 @@ struct dma_fence *amdgpu_device_enforce_isolation(struct amdgpu_device *adev,
                dma_fence_put(isolation->spearhead);
                isolation->spearhead = dma_fence_get(&f->scheduled);
                amdgpu_sync_move(&isolation->active, &isolation->prev);
+               trace_amdgpu_isolation(isolation->owner, owner);
                isolation->owner = owner;
        }
 
index 383fce40d4dd7e549f3ef0179afef6b87d1f25d3..e8147d9a54fcf08b6c6aa27b2c5146196dde0b8d 100644 (file)
@@ -457,6 +457,23 @@ DEFINE_EVENT(amdgpu_pasid, amdgpu_pasid_freed,
            TP_ARGS(pasid)
 );
 
+TRACE_EVENT(amdgpu_isolation,
+           TP_PROTO(void *prev, void *next),
+           TP_ARGS(prev, next),
+           TP_STRUCT__entry(
+                            __field(void *, prev)
+                            __field(void *, next)
+                            ),
+
+           TP_fast_assign(
+                          __entry->prev = prev;
+                          __entry->next = next;
+                          ),
+           TP_printk("prev=%p, next=%p",
+                     __entry->prev,
+                     __entry->next)
+);
+
 TRACE_EVENT(amdgpu_bo_list_set,
            TP_PROTO(struct amdgpu_bo_list *list, struct amdgpu_bo *bo),
            TP_ARGS(list, bo),