drm/amdgpu: limit the number of dst address in trace
authorSomalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Mon, 17 Jan 2022 07:49:10 +0000 (13:19 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Feb 2022 23:27:52 +0000 (18:27 -0500)
trace_amdgpu_vm_update_ptes trace unable to log when nptes too large

Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index d855cb53c7e09569fdec6b981e36a6eee86b29ea..a48b34d4ce317a4b134e37245d8717ee0f6af9df 100644 (file)
@@ -358,11 +358,10 @@ TRACE_EVENT(amdgpu_vm_update_ptes,
                        }
        ),
        TP_printk("pid:%u vm_ctx:0x%llx start:0x%010llx end:0x%010llx,"
-                 " flags:0x%llx, incr:%llu, dst:\n%s%s", __entry->pid,
+                 " flags:0x%llx, incr:%llu, dst:\n%s", __entry->pid,
                  __entry->vm_ctx, __entry->start, __entry->end,
                  __entry->flags, __entry->incr,  __print_array(
-                 __get_dynamic_array(dst), min(__entry->nptes, 32u), 8),
-                 __entry->nptes > 32 ? "..." : "")
+                 __get_dynamic_array(dst), __entry->nptes, 8))
 );
 
 TRACE_EVENT(amdgpu_vm_set_ptes,
index b37fc7d7d2c76392ad7cfd9f3d6c6cc7948b7622..4017bcf75e1f236d480e517897c550933b322659 100644 (file)
@@ -1634,7 +1634,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params,
                        nptes = max(nptes, 1u);
 
                        trace_amdgpu_vm_update_ptes(params, frag_start, upd_end,
-                                                   nptes, dst, incr, upd_flags,
+                                                   min(nptes, 32u), dst, incr, upd_flags,
                                                    vm->task_info.pid,
                                                    vm->immediate.fence_context);
                        amdgpu_vm_update_flags(params, to_amdgpu_bo_vm(pt),