diff options
author | David Mao <david.mao@amd.com> | 2016-06-07 05:48:52 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 14:51:29 -0400 |
commit | 15da301d88c8c9669a1d8ef44d729a505617abeb (patch) | |
tree | bbf9a22974daba593ef36123f21b5a78cb53e3ea /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | 42ffb5822bfa6f21e5c3738776accac49d511b98 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 7ecea83ce453..6f0873c75a25 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |||
@@ -589,6 +589,7 @@ void amdgpu_bo_move_notify(struct ttm_buffer_object *bo, | |||
589 | struct ttm_mem_reg *new_mem) | 589 | struct ttm_mem_reg *new_mem) |
590 | { | 590 | { |
591 | struct amdgpu_bo *rbo; | 591 | struct amdgpu_bo *rbo; |
592 | struct ttm_mem_reg *old_mem = &bo->mem; | ||
592 | 593 | ||
593 | if (!amdgpu_ttm_bo_is_amdgpu_bo(bo)) | 594 | if (!amdgpu_ttm_bo_is_amdgpu_bo(bo)) |
594 | return; | 595 | return; |
@@ -602,6 +603,8 @@ void amdgpu_bo_move_notify(struct ttm_buffer_object *bo, | |||
602 | 603 | ||
603 | /* move_notify is called before move happens */ | 604 | /* move_notify is called before move happens */ |
604 | amdgpu_update_memory_usage(rbo->adev, &bo->mem, new_mem); | 605 | amdgpu_update_memory_usage(rbo->adev, &bo->mem, new_mem); |
606 | |||
607 | trace_amdgpu_ttm_bo_move(rbo, new_mem->mem_type, old_mem->mem_type); | ||
605 | } | 608 | } |
606 | 609 | ||
607 | int amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo) | 610 | int amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo) |