[Mesa-dev] [PATCH 4/6] radeonsi: report a failure to parse dmesg instead of asserting

Nicolai Hähnle nhaehnle at gmail.com
Wed Jun 22 09:40:39 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/gallium/drivers/radeonsi/si_debug.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c
index f3bcae9..112e686 100644
--- a/src/gallium/drivers/radeonsi/si_debug.c
+++ b/src/gallium/drivers/radeonsi/si_debug.c
@@ -730,7 +730,12 @@ static bool si_vm_fault_occured(struct si_context *sctx, uint32_t *out_addr)
 
 		/* Get the timestamp. */
 		if (sscanf(line, "[%u.%u]", &sec, &usec) != 2) {
-			assert(0);
+			static bool hit = false;
+			if (!hit) {
+				fprintf(stderr, "%s: failed to parse line '%s'\n",
+					__func__, line);
+				hit = true;
+			}
 			continue;
 		}
 		timestamp = sec * 1000000llu + usec;
-- 
2.7.4



More information about the mesa-dev mailing list