diff options
author | bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2009-06-20 10:56:45 +0000 |
---|---|---|
committer | bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2009-06-20 10:56:45 +0000 |
commit | 7b7f3d429fe9f55cd90d667d59b3a3e0b2c9a43e (patch) | |
tree | ae890b02029a88218bf0594bc94575b2d6dc137e | |
parent | 74c2b68a7cebe40be6fb6e5f310e98df22f0df96 (diff) | |
download | valgrind-7b7f3d429fe9f55cd90d667d59b3a3e0b2c9a43e.tar.gz |
Updated test plan.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10352 a5019735-40e9-0310-863c-91ae7b9d1cf9
-rw-r--r-- | drd/Testing.txt | 13 | ||||
-rwxr-xr-x | drd/scripts/add-libjemalloc-support | 96 | ||||
-rwxr-xr-x | drd/scripts/download-and-build-firefox | 11 |
3 files changed, 12 insertions, 108 deletions
diff --git a/drd/Testing.txt b/drd/Testing.txt index 7c91bb633..f96b3df33 100644 --- a/drd/Testing.txt +++ b/drd/Testing.txt @@ -66,16 +66,11 @@ How to test DRD cvs -d :pserver:anonymous@cvs.graphicsmagick.org:/GraphicsMagick login cvs -d :pserver:anonymous@cvs.graphicsmagick.org:/GraphicsMagick co GraphicsMagick cd GraphicsMagick - ./configure --prefix=$HOME/GraphicsMagick-cvs - vi Makefile # Add --check-stack-var=yes and --var-info=yes to the - # drd: target. + ./configure export OMP_NUM_THREADS=4 - make -s drd + make -j2 -s MEMCHECK="$HOME/software/valgrind/vg-in-place --tool=drd --check-stack-var=yes --var-info=yes --quiet" check -12. Test DRD with Firefox. First of all, make sure that Valgrind is patched - such that it supports libjemalloc.so: - drd/scripts/add-libjemalloc-support - Next, build and install Firefox 3: +12. Test DRD with Firefox. First build and install Firefox 3: drd/scripts/download-and-build-firefox Now run the following command: - LD_LIBRARY_PATH=$HOME/software/mozilla-build/dist/lib: ./vg-in-place --tool=drd --check-stack-var=yes --trace-children=yes $HOME/software/mozilla-build/dist/bin/firefox-bin + LD_LIBRARY_PATH=$HOME/software/mozilla-build/dist/lib: ./vg-in-place --tool=drd --check-stack-var=yes --trace-children=yes --show-confl-seg=no $HOME/software/mozilla-build/dist/bin/firefox-bin diff --git a/drd/scripts/add-libjemalloc-support b/drd/scripts/add-libjemalloc-support deleted file mode 100755 index a4e8ffde0..000000000 --- a/drd/scripts/add-libjemalloc-support +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash - -if [ ! -e coregrind/m_replacemalloc/vg_replace_malloc.c ]; then - echo "Error: please start this script from the Valgrind source directory." - exit 1 -fi - -if grep -q -w libjemallocZdsoZa coregrind/m_replacemalloc/vg_replace_malloc.c; -then - echo "The libjemalloc patch is already present." - exit 0 -fi - -{ cat <<'EOF' | patch -p0; } || exit $? -Index: coregrind/m_replacemalloc/vg_replace_malloc.c -=================================================================== ---- coregrind/m_replacemalloc/vg_replace_malloc.c (revision 7759) -+++ coregrind/m_replacemalloc/vg_replace_malloc.c (revision 7778) -@@ -68,6 +68,10 @@ - # error "Unknown platform" - #endif - -+/* --- Soname of libjemalloc. --- */ -+ -+#define m_jemalloc_soname libjemallocZdsoZa /* libjemalloc.so* */ -+ - /* --- Soname of the GNU C++ library. --- */ - - #define m_libstdcxx_soname libstdcZpZpZa // libstdc++* -@@ -203,6 +207,7 @@ - // (from_so, from_fn, v's replacement) - - // malloc -+ALLOC_or_NULL(m_jemalloc_soname, malloc, malloc); - ALLOC_or_NULL(m_libstdcxx_soname, malloc, malloc); - ALLOC_or_NULL(m_libc_soname, malloc, malloc); - #if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5) -@@ -319,6 +324,7 @@ - } - - // free -+FREE(m_jemalloc_soname, free, free ); - FREE(m_libstdcxx_soname, free, free ); - FREE(m_libc_soname, free, free ); - #if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5) -@@ -394,6 +400,7 @@ - return v; \ - } - -+CALLOC(m_jemalloc_soname, calloc); - CALLOC(m_libc_soname, calloc); - #if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5) - CALLOC(m_libc_soname, calloc_common); -@@ -426,6 +433,7 @@ - return v; \ - } - -+REALLOC(m_jemalloc_soname, realloc); - REALLOC(m_libc_soname, realloc); - #if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5) - REALLOC(m_libc_soname, realloc_common); -@@ -457,6 +465,7 @@ - return v; \ - } - -+MEMALIGN(m_jemalloc_soname, memalign); - MEMALIGN(m_libc_soname, memalign); - - -@@ -483,6 +492,7 @@ - ((SizeT)pszB, size); \ - } - -+VALLOC(m_jemalloc_soname, valloc); - VALLOC(m_libc_soname, valloc); - - -@@ -566,6 +576,7 @@ - return VKI_ENOMEM; \ - } - -+POSIX_MEMALIGN(m_jemalloc_soname, posix_memalign); - POSIX_MEMALIGN(m_libc_soname, posix_memalign); - #if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5) - /* 27 Nov 07: it appears that xlc links into executables, a -@@ -596,6 +607,7 @@ - return pszB; \ - } - -+MALLOC_USABLE_SIZE(m_jemalloc_soname, malloc_usable_size); - MALLOC_USABLE_SIZE(m_libc_soname, malloc_usable_size); - - -EOF - -make -s diff --git a/drd/scripts/download-and-build-firefox b/drd/scripts/download-and-build-firefox index 8eb213879..84d577840 100755 --- a/drd/scripts/download-and-build-firefox +++ b/drd/scripts/download-and-build-firefox @@ -24,6 +24,11 @@ if [ ! -e /usr/include/libIDL-2.0/libIDL/IDL.h ]; then exit 1 fi +if [ ! -e /usr/include/valgrind/valgrind.h ]; then + echo "Please install the valgrind-devel package first." + exit 1 +fi + rm -rf ${BUILD} || exit $? rm -rf ${PREFIX} || exit $? mkdir -p ${DOWNLOADS} || exit $? @@ -45,13 +50,13 @@ ac_add_app_options browser --enable-application=browser ac_add_options --disable-optimize ac_add_options --disable-tests ac_add_options --enable-debug +ac_add_options --enable-optimize="-O1 -g -pipe" ac_add_options --enable-static ac_add_options --prefix $PREFIX -ac_add_options --enable-optimize="-O1 -g -pipe" +ac_add_options --with-valgrind EOF -# Note: apparently Firefox 3.0 doesn't compile with gcc 4.3. -CC=~/gcc-4.2.4/bin/gcc CXX=~/gcc-4.2.4/bin/g++ ${SRC}/configure +${SRC}/configure make -s -j2 || exit $? # make -s install || exit $? |