From: Eric Anholt Date: Thu, 21 Jun 2018 22:45:30 +0000 (-0700) Subject: v3d, vc4: Disable valgrind checking of CLE inputs when NDEBUG is set. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ee9a6a13fb3af78a2aa38492089ef934203d0790;p=mesa.git v3d, vc4: Disable valgrind checking of CLE inputs when NDEBUG is set. For a meson -Db_ndebug=true release build on x86_64, reduces text size of libv3d.a from 53.0k to 51.6k. Inspired by 0d5329d626e3 ("anv: Disable __gen_validate_value if NDEBUG is set.") --- diff --git a/src/broadcom/cle/v3d_packet_helpers.h b/src/broadcom/cle/v3d_packet_helpers.h index bc1bf3eb76e..4720f643328 100644 --- a/src/broadcom/cle/v3d_packet_helpers.h +++ b/src/broadcom/cle/v3d_packet_helpers.h @@ -31,7 +31,9 @@ #include #include #define VG(x) x +#ifndef NDEBUG #define __gen_validate_value(x) VALGRIND_CHECK_MEM_IS_DEFINED(&(x), sizeof(x)) +#endif #else #define VG(x) #endif