Commit 23d05c1c authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Bug#53593: Add some instrumentation to improve Valgrind sensitivity.

Implement WITH_VALGRIND for the CMake build.
parent cda93dfc
...@@ -115,6 +115,9 @@ OPTION(ENABLED_PROFILING "Enable profiling" ON) ...@@ -115,6 +115,9 @@ OPTION(ENABLED_PROFILING "Enable profiling" ON)
OPTION(CYBOZU "" OFF) OPTION(CYBOZU "" OFF)
OPTION(BACKUP_TEST "" OFF) OPTION(BACKUP_TEST "" OFF)
OPTION(WITHOUT_SERVER OFF) OPTION(WITHOUT_SERVER OFF)
IF(UNIX)
OPTION(WITH_VALGRIND "Valgrind instrumentation" OFF)
ENDIF()
OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON) OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON)
MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED) MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED)
......
...@@ -292,7 +292,7 @@ ...@@ -292,7 +292,7 @@
#define USE_MB 1 #define USE_MB 1
#define USE_MB_IDENT 1 #define USE_MB_IDENT 1
#cmakedefine HAVE_VALGRIND
/* Types we may use */ /* Types we may use */
#cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@ #cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@
......
...@@ -777,7 +777,7 @@ ENDIF(NOT HAVE_POSIX_SIGNALS) ...@@ -777,7 +777,7 @@ ENDIF(NOT HAVE_POSIX_SIGNALS)
# Assume regular sprintf # Assume regular sprintf
SET(SPRINTFS_RETURNS_INT 1) SET(SPRINTFS_RETURNS_INT 1)
IF(CMAKE_COMPILER_IS_GNUXX) IF(CMAKE_COMPILER_IS_GNUCXX)
CHECK_CXX_SOURCE_COMPILES(" CHECK_CXX_SOURCE_COMPILES("
#include <cxxabi.h> #include <cxxabi.h>
int main(int argc, char **argv) int main(int argc, char **argv)
...@@ -969,6 +969,14 @@ configuration. By default gcc built-in sync functions are used, ...@@ -969,6 +969,14 @@ configuration. By default gcc built-in sync functions are used,
if available and 'smp' configuration otherwise.") if available and 'smp' configuration otherwise.")
MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY) MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY)
IF(WITH_VALGRIND)
CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h"
HAVE_VALGRIND_HEADERS)
IF(HAVE_VALGRIND_HEADERS)
SET(HAVE_VALGRIND 1)
ENDIF()
ENDIF()
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Check for IPv6 support # Check for IPv6 support
#-------------------------------------------------------------------- #--------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment