Commit 0082e2fc authored by Friedrich Vock's avatar Friedrich Vock Committed by Alex Deucher

drm/amdgpu: Use the TGID for trace_amdgpu_vm_update_ptes

The pid field corresponds to the result of gettid() in userspace.
However, userspace cannot reliably attribute PTE events to processes
with just the thread id. This patch allows userspace to easily
attribute PTE update events to specific processes by comparing this
field with the result of getpid().

For attributing events to specific threads, the thread id is also
contained in the common fields of each trace event.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarFriedrich Vock <friedrich.vock@gmx.de>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 35e67ca6
...@@ -974,7 +974,7 @@ int amdgpu_vm_ptes_update(struct amdgpu_vm_update_params *params, ...@@ -974,7 +974,7 @@ int amdgpu_vm_ptes_update(struct amdgpu_vm_update_params *params,
trace_amdgpu_vm_update_ptes(params, frag_start, upd_end, trace_amdgpu_vm_update_ptes(params, frag_start, upd_end,
min(nptes, 32u), dst, incr, min(nptes, 32u), dst, incr,
upd_flags, upd_flags,
vm->task_info.pid, vm->task_info.tgid,
vm->immediate.fence_context); vm->immediate.fence_context);
amdgpu_vm_pte_update_flags(params, to_amdgpu_bo_vm(pt), amdgpu_vm_pte_update_flags(params, to_amdgpu_bo_vm(pt),
cursor.level, pe_start, dst, cursor.level, pe_start, dst,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment