Mesa (master): aubinator_error_decode: Compare only the class_name of the ring.

Rafael Antognolli rantogno at kemper.freedesktop.org
Wed Mar 21 18:35:42 UTC 2018


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

Author: Rafael Antognolli <rafael.antognolli at intel.com>
Date:   Tue Mar 20 09:13:08 2018 -0700

aubinator_error_decode: Compare only the class_name of the ring.

ring_name is "<class_name> + <instance_id>" (e.g. rcs0). So we need to
first compare the class name only, then get the instance id.

Without this, INSTDONE is not being decoded.

Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

---

 src/intel/tools/aubinator_error_decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c
index 017be5bbc2..db880d74a9 100644
--- a/src/intel/tools/aubinator_error_decode.c
+++ b/src/intel/tools/aubinator_error_decode.c
@@ -120,7 +120,7 @@ static int ring_name_to_class(const char *ring_name,
       [VECS] = "vecs",
    };
    for (size_t i = 0; i < ARRAY_SIZE(class_names); i++) {
-      if (strcmp(ring_name, class_names[i]))
+      if (strncmp(ring_name, class_names[i], strlen(class_names[i])))
          continue;
 
       *class = i;




More information about the mesa-commit mailing list