summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2010-05-20 14:43:06 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2010-05-20 14:43:06 +0300
commite4be8421c2db41093d1332044a79a7a6df5cc22f (patch)
treefab1aa5c315034c4a83ab4339173cda4270448bb /BUILD
parent8f1aaa452e0fb1762c5a2419933286adcfb39b8a (diff)
downloadmariadb-git-e4be8421c2db41093d1332044a79a7a6df5cc22f.tar.gz
Merge a change from mysql-5.1-innodb:
TO DO: Enable this in CMake-based builds. ------------------------------------------------------------ revno: 3474 revision-id: marko.makela@oracle.com-20100520104042-ma2nsscqdvwoph8k parent: marko.makela@oracle.com-20100519081618-h38q02qxuvcowbtk committer: Marko Mäkelä <marko.makela@oracle.com> branch nick: 5.1-innodb timestamp: Thu 2010-05-20 13:40:42 +0300 message: Bug#53593: Add some instrumentation to improve Valgrind sensitivity BUILD/*: Add valgrind_configs=--with-valgrind. BUILD/*: Remove -USAFEMALLOC from valgrind_flags. configure.in: Add AC_ARG_WITH(valgrind) and HAVE_VALGRIND. include/my_sys.h: Define a number of MEM_ wrappers for VALGRIND_ functions. include/my_sys.h: Make TRASH do MEM_UNDEFINED(). include/m_string.h: Remove unused macro bzero_if_purify(A,B). _mymalloc(): Declare MEM_UNDEFINED() on the allocated memory. _myfree(): Declare MEM_NOACCESS() on the freed memory. storage/innobase/include/univ.i: Enable UNIV_DEBUG_VALGRIND based on HAVE_VALGRIND rather than HAVE_purify. Possible things to do: * In my_global.h, remove the defined(HAVE_purify) condition from the _WIN32 uint3korr(). * In my_global.h *int*korr(), use | instead of + in order to keep the Valgrind V bits accurate * Consider replacing HAVE_purify with HAVE_VALGRIND * Use VALGRIND_CREATE_BLOCK, VALGRIND_DISCARD in mem_root and similar places
Diffstat (limited to 'BUILD')
-rwxr-xr-xBUILD/SETUP.sh6
-rwxr-xr-xBUILD/build_mccge.sh3
-rwxr-xr-xBUILD/compile-amd64-valgrind-max2
-rwxr-xr-xBUILD/compile-pentium-icc-valgrind-max2
-rwxr-xr-xBUILD/compile-pentium-valgrind-max2
-rwxr-xr-xBUILD/compile-pentium-valgrind-max-no-ndb2
-rwxr-xr-xBUILD/compile-pentium64-valgrind-max2
7 files changed, 12 insertions, 7 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 3655d3eae67..0bc16f120e5 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -119,8 +119,12 @@ fi
# Set flags for various build configurations.
# Used in -valgrind builds
-valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify "
+# Override -DFORCE_INIT_OF_VARS from debug_cflags. It enables the macro
+# LINT_INIT(), which is only useful for silencing spurious warnings
+# of static analysis tools. We want LINT_INIT() to be a no-op in Valgrind.
+valgrind_flags="-UFORCE_INIT_OF_VARS -DHAVE_purify "
valgrind_flags="$valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
+valgrind_configs="--with-valgrind"
#
# Used in -debug builds
debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
diff --git a/BUILD/build_mccge.sh b/BUILD/build_mccge.sh
index 8ca31b2d119..2d7c0d2a2c2 100755
--- a/BUILD/build_mccge.sh
+++ b/BUILD/build_mccge.sh
@@ -1010,9 +1010,10 @@ set_ccache_usage()
set_valgrind_flags()
{
if test "x$valgrind_flag" = "xyes" ; then
- loc_valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify "
+ loc_valgrind_flags="-UFORCE_INIT_OF_VARS -DHAVE_purify "
loc_valgrind_flags="$loc_valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
compiler_flags="$compiler_flags $loc_valgrind_flags"
+ with_flags="$with_flags --with-valgrind"
fi
}
diff --git a/BUILD/compile-amd64-valgrind-max b/BUILD/compile-amd64-valgrind-max
index 962d0f17b04..fb8dce38df3 100755
--- a/BUILD/compile-amd64-valgrind-max
+++ b/BUILD/compile-amd64-valgrind-max
@@ -4,7 +4,7 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$amd64_cflags $debug_cflags $valgrind_flags"
-extra_configs="$amd64_configs $debug_configs $max_configs"
+extra_configs="$amd64_configs $debug_configs $valgrind_configs $max_configs"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-icc-valgrind-max b/BUILD/compile-pentium-icc-valgrind-max
index 58acf892f5a..0babf9ee881 100755
--- a/BUILD/compile-pentium-icc-valgrind-max
+++ b/BUILD/compile-pentium-icc-valgrind-max
@@ -29,6 +29,6 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
c_warnings="-Wall -Wcheck -wd161,444,279,810,981,1292,1469,1572"
cxx_warnings="$c_warnings -wd869,874"
base_cxxflags="-fno-exceptions -fno-rtti"
-extra_configs="$pentium_configs $debug_configs"
+extra_configs="$pentium_configs $debug_configs $valgrind_configs"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-valgrind-max b/BUILD/compile-pentium-valgrind-max
index 09cc162d2be..8ef47bfbc17 100755
--- a/BUILD/compile-pentium-valgrind-max
+++ b/BUILD/compile-pentium-valgrind-max
@@ -4,7 +4,7 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
-extra_configs="$pentium_configs $debug_configs $max_configs"
+extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-valgrind-max-no-ndb b/BUILD/compile-pentium-valgrind-max-no-ndb
index 66f6ae08a7f..f480f83ebf7 100755
--- a/BUILD/compile-pentium-valgrind-max-no-ndb
+++ b/BUILD/compile-pentium-valgrind-max-no-ndb
@@ -4,7 +4,7 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
-extra_configs="$pentium_configs $debug_configs $max_no_ndb_configs"
+extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_no_ndb_configs"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium64-valgrind-max b/BUILD/compile-pentium64-valgrind-max
index fa476cbb50a..eb3d20c874d 100755
--- a/BUILD/compile-pentium64-valgrind-max
+++ b/BUILD/compile-pentium64-valgrind-max
@@ -4,7 +4,7 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $debug_cflags $valgrind_flags"
-extra_configs="$pentium_configs $debug_configs $max_configs"
+extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
. "$path/FINISH.sh"