Skip to content

Commit 1bb1314

Browse files
ChristianKoenigAMDalexdeucher
authored andcommitted
drm/amdgpu: add isolation trace point
Note when we switch from one isolation owner to another. Signed-off-by: Christian König <[email protected]> Acked-by: Srinivasan Shanmugam <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent db1e58e commit 1bb1314

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7028,6 +7028,7 @@ struct dma_fence *amdgpu_device_enforce_isolation(struct amdgpu_device *adev,
70287028
dma_fence_put(isolation->spearhead);
70297029
isolation->spearhead = dma_fence_get(&f->scheduled);
70307030
amdgpu_sync_move(&isolation->active, &isolation->prev);
7031+
trace_amdgpu_isolation(isolation->owner, owner);
70317032
isolation->owner = owner;
70327033
}
70337034

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,23 @@ DEFINE_EVENT(amdgpu_pasid, amdgpu_pasid_freed,
457457
TP_ARGS(pasid)
458458
);
459459

460+
TRACE_EVENT(amdgpu_isolation,
461+
TP_PROTO(void *prev, void *next),
462+
TP_ARGS(prev, next),
463+
TP_STRUCT__entry(
464+
__field(void *, prev)
465+
__field(void *, next)
466+
),
467+
468+
TP_fast_assign(
469+
__entry->prev = prev;
470+
__entry->next = next;
471+
),
472+
TP_printk("prev=%p, next=%p",
473+
__entry->prev,
474+
__entry->next)
475+
);
476+
460477
TRACE_EVENT(amdgpu_bo_list_set,
461478
TP_PROTO(struct amdgpu_bo_list *list, struct amdgpu_bo *bo),
462479
TP_ARGS(list, bo),

0 commit comments

Comments
 (0)