Module: Mesa Branch: master Commit: 3fee3d1319768e6304edbe71296d68eeba973685 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3fee3d1319768e6304edbe71296d68eeba973685
Author: Kenneth Graunke <[email protected]> Date: Sat Mar 23 09:32:38 2019 -0700 iris: Print the memzone name when allocating BOs with INTEL_DEBUG=buf This gives me an idea of what kinds of buffers are being allocated on the fly which could help inform our cache decisions. --- src/gallium/drivers/iris/iris_bufmgr.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index e0d167913d2..56261d4a947 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -117,6 +117,21 @@ atomic_add_unless(int *v, int add, int unless) return c == unless; } +static const char * +memzone_name(enum iris_memory_zone memzone) +{ + const char *names[] = { + [IRIS_MEMZONE_SHADER] = "shader", + [IRIS_MEMZONE_BINDER] = "binder", + [IRIS_MEMZONE_SURFACE] = "surface", + [IRIS_MEMZONE_DYNAMIC] = "dynamic", + [IRIS_MEMZONE_OTHER] = "other", + [IRIS_MEMZONE_BORDER_COLOR_POOL] = "bordercolor", + }; + assert(memzone < ARRAY_SIZE(names)); + return names[memzone]; +} + /** * Iris fixed-size bucketing VMA allocator. * @@ -662,8 +677,8 @@ skip_cache: } } - DBG("bo_create: buf %d (%s) %llub\n", bo->gem_handle, bo->name, - (unsigned long long) size); + DBG("bo_create: buf %d (%s) (%s memzone) %llub\n", bo->gem_handle, + bo->name, memzone_name(memzone), (unsigned long long) size); return bo; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
