[Intel-gfx] [PATCH i-g-t 3/3] aubdump: Log some information about the execbuf calls

Scott D Phillips scott.d.phillips at intel.com
Wed Aug 23 18:00:43 UTC 2017


Jason Ekstrand <jason at jlekstrand.net> writes:

> ---
>  tools/aubdump.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tools/aubdump.c b/tools/aubdump.c
> index 567de3d..cf4c6e8 100644
> --- a/tools/aubdump.c
> +++ b/tools/aubdump.c
> @@ -405,6 +405,8 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2)
>  	struct bo *bo, *batch_bo;
>  	void *data;
>  
> +	fprintf(stderr, "Dumping execbuffer2:\n");
> +

Maybe put these prints under an `if (verbose)'. Series is

Reviewed-by: Scott D Phillips <scott.d.phillips at intel.com>

>  	/* We can't do this at open time as we're not yet authenticated. */
>  	if (device == 0) {
>  		device = gem_get_param(fd, I915_PARAM_CHIPSET_ID);
> @@ -427,8 +429,12 @@ 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) {
> +			fprintf(stderr, "BO #%d is invalid!\n", obj->handle);
>  			return;
> +		}
> +
> +		fprintf(stderr, "BO #%d (%dB) @ 0x%x\n", obj->handle, bo->size, offset);
>  
>  		if (obj->flags & EXEC_OBJECT_PINNED) {
>  			bo->offset = obj->offset;
> -- 
> 2.5.0.400.gff86faf
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list