From 29d488034a50cd6fbad792cae61321995f0ab51c Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 23 Aug 2017 09:50:17 -0700 Subject: aubdump: Log some information about the execbuf calls Reviewed-by: Scott D Phillips --- tools/aubdump.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools/aubdump.c') diff --git a/tools/aubdump.c b/tools/aubdump.c index 567de3db..4387ea83 100644 --- a/tools/aubdump.c +++ b/tools/aubdump.c @@ -420,6 +420,9 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2) filename, device, gen); } + if (verbose) + printf("Dumping execbuffer2:\n"); + for (uint32_t i = 0; i < execbuffer2->buffer_count; i++) { obj = &exec_objects[i]; bo = get_bo(obj->handle); @@ -427,8 +430,14 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2) /* If bo->size == 0, this means they passed us an invalid * buffer. The kernel will reject it and so should we. */ - if (bo->size == 0) + if (bo->size == 0) { + if (verbose) + printf("BO #%d is invalid!\n", obj->handle); return; + } + + if (verbose) + printf("BO #%d (%dB) @ 0x%x\n", obj->handle, bo->size, offset); if (obj->flags & EXEC_OBJECT_PINNED) { bo->offset = obj->offset; -- cgit v1.2.3