Module: Mesa
Branch: master
Commit: 14ec91b1319254c5ee608fa0d6c0110439c29d7b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=14ec91b1319254c5ee608fa0d6c0110439c29d7b

Author: Samuel Pitoiset <[email protected]>
Date:   Sat Nov 21 17:58:13 2020 +0100

radv: dump BO ranges into bo_ranges.log instead of stderr

Like other dumps during GPU hang detection.

Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7706>

---

 src/amd/vulkan/radv_debug.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c
index fb8b5ed0703..e4ed1079715 100644
--- a/src/amd/vulkan/radv_debug.c
+++ b/src/amd/vulkan/radv_debug.c
@@ -697,9 +697,13 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct 
radeon_cmdbuf *cs)
                fclose(f);
        }
 
-       fprintf(stderr, "BOs:\n");
-       device->ws->dump_bo_ranges(device->ws, stderr);
-       fprintf(stderr, "\n");
+       /* Dump BO ranges. */
+       snprintf(dump_path, sizeof(dump_path), "%s/%s", dump_dir, 
"bo_ranges.log");
+       f = fopen(dump_path, "w+");
+       if (f) {
+               device->ws->dump_bo_ranges(device->ws, f);
+               fclose(f);
+       }
 
        /* Dump VM fault info. */
        if (vm_fault_occurred) {

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

Reply via email to