Skip to contentSkip to conversation

drm/amdgpu: limit the amdgpu_vm_update_ptes trace point

PATCH In review Christian König 2 participants 2 messages Dec 8, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: limit the amdgpu_vm_update_ptes trace point

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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +3 -2
index ee9480d14cbc..11b1b1122c34 100644
@@ -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,
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

Looks good to me, Please feel free to use:

Regards
Shashank
-----Original Message-----
From: Christian König <[email protected]>
Sent: Tuesday, December 8, 2020 11:01 PM
To: [email protected]
Cc: Sharma, Shashank <[email protected]>
Subject: [PATCH] drm/amdgpu: limit the amdgpu_vm_update_ptes trace point

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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +3 -2
index ee9480d14cbc..11b1b1122c34 100644
@@ -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,
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx