anv: Add an aperture space summary to INTEL_DEBUG=submit.

Same as on iris, this is nice for tracking at a high level how much memory
is being used.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20540>
This commit is contained in:
Emma Anholt
2023-01-05 13:32:04 -08:00
committed by Marge Bot
parent 7ab7b9770e
commit e937c4b716

View File

@@ -1829,8 +1829,15 @@ anv_queue_exec_locked(struct anv_queue *queue,
perf_query_pool && perf_query_pass >= 0 && cmd_buffer_count;
if (INTEL_DEBUG(DEBUG_SUBMIT)) {
fprintf(stderr, "Batch offset=0x%x len=0x%x on queue 0\n",
execbuf.execbuf.batch_start_offset, execbuf.execbuf.batch_len);
uint32_t total_size_kb = 0;
for (uint32_t i = 0; i < execbuf.bo_count; i++) {
const struct anv_bo *bo = execbuf.bos[i];
total_size_kb += bo->size / 1024;
}
fprintf(stderr, "Batch offset=0x%x len=0x%x on queue 0 (%.1fMb aperture)\n",
execbuf.execbuf.batch_start_offset, execbuf.execbuf.batch_len,
(float)total_size_kb / 1024.0f);
for (uint32_t i = 0; i < execbuf.bo_count; i++) {
const struct anv_bo *bo = execbuf.bos[i];