From ee9a6a13fb3af78a2aa38492089ef934203d0790 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 21 Jun 2018 15:45:30 -0700 Subject: [PATCH] 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.") --- src/broadcom/cle/v3d_packet_helpers.h | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.30.2