mirror of
https://github.com/torvalds/linux.git
synced 2026-05-01 04:52:32 -04:00
drm/amd/amdgpu : adding new tracepoints to track memory information.
- adding amdgpu_cs_bo_status to track total size and total entry count of bo for each submission. - adding amdgpu_ttm_bo_move to track the bo eviction including the size of bo and the location before/after the move Signed-off-by: David Mao <David.Mao@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -589,6 +589,7 @@ void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
|
||||
struct ttm_mem_reg *new_mem)
|
||||
{
|
||||
struct amdgpu_bo *rbo;
|
||||
struct ttm_mem_reg *old_mem = &bo->mem;
|
||||
|
||||
if (!amdgpu_ttm_bo_is_amdgpu_bo(bo))
|
||||
return;
|
||||
@@ -602,6 +603,8 @@ void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
|
||||
|
||||
/* move_notify is called before move happens */
|
||||
amdgpu_update_memory_usage(rbo->adev, &bo->mem, new_mem);
|
||||
|
||||
trace_amdgpu_ttm_bo_move(rbo, new_mem->mem_type, old_mem->mem_type);
|
||||
}
|
||||
|
||||
int amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo)
|
||||
|
||||
Reference in New Issue
Block a user