[Mesa-dev] [PATCH 5/5] i965: Skip IR annotations with INTEL_DEBUG=noann.
Kenneth Graunke
kenneth at whitecape.org
Sat May 31 17:52:26 PDT 2014
On Friday, May 30, 2014 07:35:23 PM Matt Turner wrote:
> Running shader-db with INTEL_DEBUG=noann reduces the runtime
> from ~90 to ~80 seconds on my machine. It also reduces the disk space
> consumed by the .out files from 660 MB (676 on disk) to 343 MB (358 on
> disk).
> ---
> src/mesa/drivers/dri/i965/brw_shader.cpp | 6 ++++--
> src/mesa/drivers/dri/i965/intel_debug.c | 1 +
> src/mesa/drivers/dri/i965/intel_debug.h | 1 +
> 3 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
> index 69eab59..1ab5f07 100644
> --- a/src/mesa/drivers/dri/i965/brw_shader.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
> @@ -794,8 +794,10 @@ void annotate(struct brw_context *brw,
>
> struct annotation *ann = &annotation->ann[annotation->ann_count++];
> ann->offset = offset;
> - ann->ir = inst->ir;
> - ann->annotation = inst->annotation;
> + if ((INTEL_DEBUG & DEBUG_NO_ANNOTATION) != 0) {
This does the opposite of what you said. With this patch,
annotations are off by default, and INTEL_DEBUG=noann turns them back on.
I think you mean == 0.
With that fixed, this series is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Thanks for adding the geteuid checks.
> + ann->ir = inst->ir;
> + ann->annotation = inst->annotation;
> + }
>
> if (cfg->blocks[annotation->cur_block]->start == inst) {
> ann->block_start = cfg->blocks[annotation->cur_block];
> diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c
> index bba873b..c72fce2 100644
> --- a/src/mesa/drivers/dri/i965/intel_debug.c
> +++ b/src/mesa/drivers/dri/i965/intel_debug.c
> @@ -65,6 +65,7 @@ static const struct dri_debug_control debug_control[] = {
> { "blorp", DEBUG_BLORP },
> { "nodualobj", DEBUG_NO_DUAL_OBJECT_GS },
> { "optimizer", DEBUG_OPTIMIZER },
> + { "noann", DEBUG_NO_ANNOTATION },
> { NULL, 0 }
> };
>
> diff --git a/src/mesa/drivers/dri/i965/intel_debug.h b/src/mesa/drivers/dri/i965/intel_debug.h
> index f257054..37dc34a 100644
> --- a/src/mesa/drivers/dri/i965/intel_debug.h
> +++ b/src/mesa/drivers/dri/i965/intel_debug.h
> @@ -61,6 +61,7 @@ extern uint64_t INTEL_DEBUG;
> #define DEBUG_VUE 0x40000000
> #define DEBUG_NO_DUAL_OBJECT_GS 0x80000000
> #define DEBUG_OPTIMIZER 0x100000000
> +#define DEBUG_NO_ANNOTATION 0x200000000
>
> #ifdef HAVE_ANDROID_PLATFORM
> #define LOG_TAG "INTEL-MESA"
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140531/78bdb0fe/attachment.sig>
More information about the mesa-dev
mailing list