aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorFriedrich Vock <friedrich.vock@gmx.de>2023-02-02 17:21:03 +0100
committerAlex Deucher <alexander.deucher@amd.com>2023-02-08 17:36:44 -0500
commit0082e2fcd71c13208fcedd75b0599ff09cb5a940 (patch)
tree150637e93b3eba416e495c53ba0a9c93329b4b70
parentdrm/amdgpu: Add unique_id support for GC 11.0.1/2 (diff)
downloadwireguard-linux-0082e2fcd71c13208fcedd75b0599ff09cb5a940.tar.xz
wireguard-linux-0082e2fcd71c13208fcedd75b0599ff09cb5a940.zip
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 <christian.koenig@amd.com> Signed-off-by: Friedrich Vock <friedrich.vock@gmx.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
index b5f3bba851db..01e42bdd8e4e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
@@ -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,
min(nptes, 32u), dst, incr,
upd_flags,
- vm->task_info.pid,
+ vm->task_info.tgid,
vm->immediate.fence_context);
amdgpu_vm_pte_update_flags(params, to_amdgpu_bo_vm(pt),
cursor.level, pe_start, dst,