[Mesa-dev] [PATCH v1] i965/bo/perf: 0-sized-bo allocation log

Sergii Romantsov sergii.romantsov at gmail.com
Wed Aug 15 14:10:09 UTC 2018


Added debug-log in case of bo-allocation with 0 size.
Potentially we may not need to allocate such buffers and each
case could be analyzed to improve behaviour.

Signed-off-by: Sergii Romantsov <sergii.romantsov at globallogic.com>
---
 src/mesa/drivers/dri/i965/brw_bufmgr.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index 09d45e3..726b266 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -514,6 +514,9 @@ bo_alloc_internal(struct brw_bufmgr *bufmgr,
     * be idle before we can memset.  Just disallow that combination.
     */
    assert(!(busy && zeroed));
+   if (!size && unlikely(INTEL_DEBUG & DEBUG_PERF))
+      dbg_printf("performance: allocation of 0-sized BO: %s\n", name);
+
 
    /* Round the allocated size up to a power of two number of pages. */
    bucket = bucket_for_size(bufmgr, size);
-- 
2.7.4



More information about the mesa-dev mailing list