diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2010-05-20 13:40:42 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2010-05-20 13:40:42 +0300 |
commit | 98406ba452be5fc8b0ee53cf69812342af1c9ffb (patch) | |
tree | e35668f8c56a797b5b3dbc27c5b20a1fbf607a7e /storage | |
parent | 3564a2643f49e3b4a75f2c6af9cf697971d2aa4f (diff) | |
download | mariadb-git-98406ba452be5fc8b0ee53cf69812342af1c9ffb.tar.gz |
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 'storage')
-rw-r--r-- | storage/innobase/include/univ.i | 4 | ||||
-rw-r--r-- | storage/innodb_plugin/include/univ.i | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index ecf754762ad..97d022d284e 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -82,9 +82,9 @@ memory is read outside the allocated blocks. */ /* Make a non-inline debug version */ -#ifdef HAVE_purify +#if defined HAVE_VALGRIND # define UNIV_DEBUG_VALGRIND -#endif /* HAVE_purify */ +#endif /* HAVE_VALGRIND */ #if 0 #define UNIV_DEBUG_VALGRIND /* Enable extra Valgrind instrumentation */ diff --git a/storage/innodb_plugin/include/univ.i b/storage/innodb_plugin/include/univ.i index 8fb2505a791..018fd157a25 100644 --- a/storage/innodb_plugin/include/univ.i +++ b/storage/innodb_plugin/include/univ.i @@ -165,9 +165,9 @@ command. Not tested on Windows. */ #define UNIV_COMPILE_TEST_FUNCS */ -#ifdef HAVE_purify +#if defined HAVE_VALGRIND # define UNIV_DEBUG_VALGRIND -#endif /* HAVE_purify */ +#endif /* HAVE_VALGRIND */ #if 0 #define UNIV_DEBUG_VALGRIND /* Enable extra Valgrind instrumentation */ |