radeonsi: report a failure to parse dmesg instead of asserting
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 20 Jun 2016 18:24:03 +0000 (20:24 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 24 Jun 2016 10:36:03 +0000 (12:36 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_debug.c

index f3bcae94cdc392fdb1b1b85e304ec694f9393aae..112e68684f39655ccc5b4df57668a4f46e4a4809 100644 (file)
@@ -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;