drm/amdgpu: trace allocated PASIDs
Trace all allocated PASIDs. Signed-off-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:
Родитель
5c2ff9a60d
Коммит
c35ff18823
|
@ -69,6 +69,9 @@ int amdgpu_pasid_alloc(unsigned int bits)
|
|||
break;
|
||||
}
|
||||
|
||||
if (pasid >= 0)
|
||||
trace_amdgpu_pasid_allocated(pasid);
|
||||
|
||||
return pasid;
|
||||
}
|
||||
|
||||
|
@ -78,6 +81,7 @@ int amdgpu_pasid_alloc(unsigned int bits)
|
|||
*/
|
||||
void amdgpu_pasid_free(unsigned int pasid)
|
||||
{
|
||||
trace_amdgpu_pasid_freed(pasid);
|
||||
ida_simple_remove(&amdgpu_pasid_ida, pasid);
|
||||
}
|
||||
|
||||
|
|
|
@ -378,6 +378,28 @@ TRACE_EVENT(amdgpu_vm_flush,
|
|||
__entry->vm_hub,__entry->pd_addr)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(amdgpu_pasid,
|
||||
TP_PROTO(unsigned pasid),
|
||||
TP_ARGS(pasid),
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned, pasid)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->pasid = pasid;
|
||||
),
|
||||
TP_printk("pasid=%u", __entry->pasid)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(amdgpu_pasid, amdgpu_pasid_allocated,
|
||||
TP_PROTO(unsigned pasid),
|
||||
TP_ARGS(pasid)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(amdgpu_pasid, amdgpu_pasid_freed,
|
||||
TP_PROTO(unsigned pasid),
|
||||
TP_ARGS(pasid)
|
||||
);
|
||||
|
||||
TRACE_EVENT(amdgpu_bo_list_set,
|
||||
TP_PROTO(struct amdgpu_bo_list *list, struct amdgpu_bo *bo),
|
||||
TP_ARGS(list, bo),
|
||||
|
|
Загрузка…
Ссылка в новой задаче