From: Philippe Waroquiers Date: Fri, 27 Sep 2013 18:10:29 +0000 (+0000) Subject: ensure nightly regression tests can (optionally) run perf tests X-Git-Tag: svn/VALGRIND_3_9_0~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a9976ee6cc4f3a72a134e87019f9e0072161f64;p=thirdparty%2Fvalgrind.git ensure nightly regression tests can (optionally) run perf tests git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13580 --- diff --git a/nightly/README.txt b/nightly/README.txt index c4f292b6c2..4ab9d21dae 100644 --- a/nightly/README.txt +++ b/nightly/README.txt @@ -86,6 +86,18 @@ To set up nightly testing for a machine, do the following. - ABT_JOBS: allows parallel builds -- it's passed as the argument to "make -j" when building Valgrind and the tests. The default is 1. + - ABT_PERF: unset or set to "" mean 'do not run perf tests' (default value) + set to "--vg=../valgrind-new" (run perf tests for new tree) + set to "--vg=../valgrind-new --vg=../valgrind-old" + (run perf tests for "new" and for "24 hours ago", + to compare the performances between the 2 trees). + + - ABT_PERF_TOOLS: --tools=.... option of perf/vg_perf. + (default value: all non experimental tools) + + - ABT_PERF_REPS: --reps=... option of perf/vg_perf + (default value: --reps=3) + Note that the appropriate syntax to use in this file will depend on the shell from which the $DIR/bin/nightly script is run (which in turn may depend on what shell is used by cron or any similar program). diff --git a/nightly/bin/nightly b/nightly/bin/nightly index 9e35d4ff2a..6057951d67 100755 --- a/nightly/bin/nightly +++ b/nightly/bin/nightly @@ -116,6 +116,13 @@ if [ "${ABT_RUN_REGTEST}" = "" ]; then ABT_RUN_REGTEST="make regtest" fi +if [ "${ABT_PERF_TOOLS}" = "" ]; then + ABT_PERF_TOOLS="--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif" +fi +if [ "${ABT_PERF_REPS}" = "" ]; then + ABT_PERF_REPS="--reps=3" +fi + #---------------------------------------------------------------------------- # Check out, build, test @@ -184,6 +191,15 @@ for logfile in old new ; do ) done +# if requested, run regression tests and produce results in perflogfile.out +if [ "${ABT_PERF}" != "" ]; then + cd valgrind-new + echo ${ABT_PERF_TOOLS} ${ABT_PERF_REPS} ${ABT_PERF} > ../perflogfile + (time perl perf/vg_perf ${ABT_PERF_TOOLS} ${ABT_PERF_REPS} ${ABT_PERF} perf) >> ../perflogfile 2>&1 + cd .. +fi + + #---------------------------------------------------------------------------- # Prepare results and send #---------------------------------------------------------------------------- @@ -257,6 +273,11 @@ if [ $changed != 0 ] ; then echo >> final fi +# add perf results if requested +if [ "${ABT_PERF}" != "" ]; then + cat perflogfile >> final +fi + # Gather up the diffs (at most the first 100 lines for each one) into a # single file. MAX_LINES=100