]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: limit the amdgpu_vm_update_ptes trace point
authorChristian König <christian.koenig@amd.com>
Tue, 8 Dec 2020 15:19:42 +0000 (16:19 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 10 Dec 2020 21:41:48 +0000 (16:41 -0500)
The text output should not be more than a page, so only print the first
32 page table entries.

If we need all of them we can still look into the binary trace.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h

index 324d5e3f357916a9b79cfc4229699cb428474c7d..6752d8b131188471d683efde37263283001100e9 100644 (file)
@@ -358,10 +358,11 @@ 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", __entry->pid,
+                 " flags:0x%llx, incr:%llu, dst:\n%s%s", __entry->pid,
                  __entry->vm_ctx, __entry->start, __entry->end,
                  __entry->flags, __entry->incr,  __print_array(
-                 __get_dynamic_array(dst), __entry->nptes, 8))
+                 __get_dynamic_array(dst), min(__entry->nptes, 32u), 8),
+                 __entry->nptes > 32 ? "..." : "")
 );
 
 TRACE_EVENT(amdgpu_vm_set_ptes,