Mesa (main): iris: also dump bo's imported and exported flags

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 22 17:09:56 UTC 2021


Module: Mesa
Branch: main
Commit: 785dd68599e704847aaf324e69f09b66551f2df0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=785dd68599e704847aaf324e69f09b66551f2df0

Author: Paulo Zanoni <paulo.r.zanoni at intel.com>
Date:   Tue Oct 19 13:13:48 2021 -0700

iris: also dump bo's imported and exported flags

My original patch also aligned the columns for better printing, but
Ken's recent suballocation series incorporated those changes. My
original patch was also printing the EXEC_OBJECT_ASYNC flag, but this
is not possible anymore as we don't have the validation list here. But
it's fine since EXEC_OBJECT_ASYNC is conditional on
iris_bo_is_external(), which is true for either exported or imported.

Example output:

BO list (length 13):
[ 0]:   8 (  8) command buffer @ 0xfffffffefffdd000 (system    65536B)  2 refs
[ 1]:   1 (  1) workaround     @ 0xfffffffefffff000 (system     4096B)  3 refs
[ 2]:  14 ( 14) dynamic state  @ 0x00000002fffef000 (system    65536B)  2 refs  write
[ 3]:   0 ( 10) miptree        @ 0xfffffffeffc00000 (system   471104B)  4 refs  write
[ 4]:  15 ( 15) shader kernels @ 0x00000000ffff7000 (system    16384B)  2 refs
[ 5]:   0 ( 13) buffer         @ 0xfffffffefe700000 (system  1048576B)  2 refs
[ 6]:   4 (  4) surface state  @ 0x00000001fffef000 (system    65536B)  2 refs
[ 7]:   3 (  3) binder         @ 0x0000000100000000 (system    65536B)  2 refs
[ 8]:  18 ( 18) miptree        @ 0xfffffffeffebd000 (system   524288B)  2 refs  write exported
[ 9]:  11 ( 11) buffer         @ 0xfffffffefe800000 (system 20971520B)  2 refs
[10]:   0 ( 13) buffer         @ 0xfffffffefe600000 (system  1048576B)  2 refs
[11]:  12 ( 12) shader kernels @ 0x00000000ffffb000 (system    16384B)  2 refs
[12]:   5 (  5) buffer         @ 0xfffffffeffffe000 (system     4096B)  2 refs  write

Reviewed-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12654>

---

 src/gallium/drivers/iris/iris_batch.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c
index f9a1eed0def..4d073077df1 100644
--- a/src/gallium/drivers/iris/iris_batch.c
+++ b/src/gallium/drivers/iris/iris_batch.c
@@ -105,8 +105,10 @@ dump_bo_list(struct iris_batch *batch)
       struct iris_bo *bo = batch->exec_bos[i];
       struct iris_bo *backing = iris_get_backing_bo(bo);
       bool written = BITSET_TEST(batch->bos_written, i);
+      bool exported = iris_bo_is_exported(bo);
+      bool imported = iris_bo_is_imported(bo);
 
-      fprintf(stderr, "[%2d]: %3d (%3d) %-14s @ 0x%016"PRIx64" (%-6s %8"PRIu64"B) %2d refs  %s\n",
+      fprintf(stderr, "[%2d]: %3d (%3d) %-14s @ 0x%016"PRIx64" (%-6s %8"PRIu64"B) %2d refs %s%s%s\n",
               i,
               bo->gem_handle,
               backing->gem_handle,
@@ -115,7 +117,9 @@ dump_bo_list(struct iris_batch *batch)
               backing->real.local ? "local" : "system",
               bo->size,
               bo->refcount,
-              written ? "(write)" : "");
+              written ? " write" : "",
+              exported ? " exported" : "",
+              imported ? " imported" : "");
    }
 }
 



More information about the mesa-commit mailing list