[Mesa-dev] [PATCH] anv: Disable __gen_validate_value if NDEBUG is set.

Eric Anholt eric at anholt.net
Thu Jun 21 22:56:05 UTC 2018


Kenneth Graunke <kenneth at whitecape.org> writes:

> We were enabling undefined memory checking for genxml values based on
> Valgrind being installed at build time, even for release builds.  This
> generates piles and piles of assembly whenever you touch genxml.
>
> With gcc 7.3.1 and -O3 and -march=native on a Kabylake with Valgrind
> installed at build time:
>
>       text    data    bss     dec    hex filename
>    5978385  262884  13488 6254757 5f70a5 libvulkan_intel.so
>    3799377  262884  13488 4075749 3e30e5 libvulkan_intel.so
>
> That's a 36% reduction in text size.
> ---
>  src/intel/vulkan/anv_private.h | 2 ++
>  1 file changed, 2 insertions(+)
>
>  Eric,
>
>  You probably will want to make the equivalent change in
>  src/broadcom/cle/v3d_packet_helpers.h

Thanks for the cc on this one -- it paid off for v3d, too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180621/5d1f672f/attachment.sig>


More information about the mesa-dev mailing list