Skip to content

Commit e53448e

Browse files
pixelclusteralexdeucher
authored andcommitted
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: Christian König <[email protected]> Signed-off-by: Friedrich Vock <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent c108a18 commit e53448e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ int amdgpu_vm_ptes_update(struct amdgpu_vm_update_params *params,
974974
trace_amdgpu_vm_update_ptes(params, frag_start, upd_end,
975975
min(nptes, 32u), dst, incr,
976976
upd_flags,
977-
vm->task_info.pid,
977+
vm->task_info.tgid,
978978
vm->immediate.fence_context);
979979
amdgpu_vm_pte_update_flags(params, to_amdgpu_bo_vm(pt),
980980
cursor.level, pe_start, dst,

0 commit comments

Comments
 (0)