From: Bart Van Assche Date: Wed, 9 Jul 2008 09:23:28 +0000 (+0000) Subject: Updated DRD test plan. X-Git-Tag: svn/VALGRIND_3_4_0~340 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74aae2544ce335f32cd5502f00ae4c328a2757e2;p=thirdparty%2Fvalgrind.git Updated DRD test plan. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8407 --- diff --git a/drd/Testing.txt b/drd/Testing.txt index 2502a8e833..82435693d3 100644 --- a/drd/Testing.txt +++ b/drd/Testing.txt @@ -7,22 +7,25 @@ How to test DRD 2. Run Konstantin's regression tests: svn checkout http://data-race-test.googlecode.com/svn/trunk drt make -C drt/unittest -s build - ./vg-in-place --tool=drd drt/unittest/racecheck_unittest 2>&1|less + ./vg-in-place --tool=drd --check-stack-var=yes drt/unittest/racecheck_unittest 2>&1|less 3. Test the slowdown for matinv for various matrix sizes via the script drd/scripts/run-matinv (must be about 24 for i == 1 and about 31 for i == 10 with n == 200). 4. Test whether DRD works with standard KDE applications and whether it does - not print any false positives: - ./vg-in-place --tool=drd kate - ./vg-in-place --tool=drd --check-stack-var=yes kate - ./vg-in-place --trace-children=yes --tool=drd knode - ./vg-in-place --trace-children=yes --tool=drd --check-stack-var=yes knode - ./vg-in-place --trace-children=yes --tool=drd amarokapp + not print any false positives. Test this both with KDE3 and KDE4. + ./vg-in-place --tool=drd --var-info=yes kate + ./vg-in-place --tool=drd --var-info=yes --check-stack-var=yes kate + ./vg-in-place --tool=drd --var-info=yes --trace-children=yes knode + ./vg-in-place --tool=drd --var-info=yes --check-stack-var=yes --trace-children=yes knode + ./vg-in-place --tool=drd --var-info=yes --check-stack-var=yes /usr/bin/designer 5. Test whether DRD works with standard GNOME applications. Expect race reports triggered by ORBit_RootObject_duplicate() and after having closed the GNOME terminal window: - ./vg-in-place --trace-children=yes --tool=drd gnome-terminal -6. Test DRD with Firefox. First of all, build and install Firefox 3: + ./vg-in-place --tool=drd --var-info=yes --trace-children=yes gnome-terminal +6. 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: drd/scripts/download-and-build-firefox - Next, run the following command: - LD_LIBRARY_PATH=$HOME/software/mozilla-build/dist/lib: ./vg-in-place --trace-children=yes --tool=drd $HOME/software/mozilla-build/dist/bin/firefox-bin + 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 diff --git a/drd/scripts/add-libjemalloc-support b/drd/scripts/add-libjemalloc-support new file mode 100755 index 0000000000..a4e8ffde01 --- /dev/null +++ b/drd/scripts/add-libjemalloc-support @@ -0,0 +1,96 @@ +#!/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