]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
An extension of the previous commit: the vg_perf --tools option is so useful
authorNicholas Nethercote <njn@valgrind.org>
Wed, 22 Nov 2006 00:52:00 +0000 (00:52 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Wed, 22 Nov 2006 00:52:00 +0000 (00:52 +0000)
that I got rid of the "tools:" line in the .vg_perf files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6364

perf/bigcode1.vgperf
perf/bigcode2.vgperf
perf/bz2.vgperf
perf/fbench.vgperf
perf/ffbench.vgperf
perf/heap.vgperf
perf/sarp.vgperf
perf/tinycc.vgperf
perf/vg_perf.in

index 1f39f38e34c2bdba7abcb4d464df4f850f058483..2fdcb4c3a0c5eda225a174d99fd11dac8371b36c 100644 (file)
@@ -1,2 +1 @@
 prog: bigcode
-tools: none memcheck
index a7fc95431c9718cf88e3cee6e3a393004f011df6..e4a42c9890c187e6e5746fed83f21e62ef78d438 100644 (file)
@@ -1,3 +1,2 @@
 prog: bigcode
 args: 0
-tools: none memcheck
index 37c717095f1a0242d1f0e7f68d710a2f393ba236..4cb3848633480ceafe60b80c6cc1d7e90e83d5d5 100644 (file)
@@ -1,2 +1 @@
 prog: bz2
-tools: none memcheck
index f46b4263b152995930c27e122f7abe2d25c3f882..ce547271b9d6341b34e6bb06315a339783f0c6cf 100644 (file)
@@ -1,2 +1 @@
 prog: fbench
-tools: none memcheck
index 98dae55cdf1f00db2cadfe6f39a5be45507d8eed..df3213c8479164eb6109c61308c577b6ee719a07 100644 (file)
@@ -1,2 +1 @@
 prog: ffbench
-tools: none memcheck
index a3628015c87e9758d2a2ee5069ae965bf9eb0839..9da6fd4c47de844858a2fc76addf921e7950800a 100644 (file)
@@ -1,2 +1 @@
 prog: heap
-tools: none memcheck
index 83c634a2e5e8ce48ce0a2d1fa5ab672f0eb23e8a..00b3902d7ae6e88ae7564f63110719cc3c659752 100644 (file)
@@ -1,2 +1 @@
 prog: sarp
-tools: none memcheck
index c6303ed27a6508eea3f03d171d60f611f1ade24e..c089740f9c168b2a3d307bcb90a5919d8b5ed130 100644 (file)
@@ -1,3 +1,2 @@
 prog: tinycc
 args: -c test_input_for_tinycc.c
-tools: none memcheck
index c9d6d95cb732a3c6d1dde6292b647dcbf4ccbdc3..b4625ec65b80f0379ed2c39ad265e75c27aefa9e 100644 (file)
@@ -41,7 +41,6 @@
 # Each test is defined in a file <test>.vgperf, containing one or more of the
 # following lines, in any order:
 #   - prog:   <prog to run>                         (compulsory)
-#   - tools:  <Valgrind tools>                      (compulsory)
 #   - args:   <args for prog>                       (default: none)
 #   - vgopts: <Valgrind options>                    (default: none)
 #   - prereq: <prerequisite command>                (default: none)
@@ -64,10 +63,13 @@ usage: vg_perf [options] [files or dirs]
     -h --help             show this message
     --all                 run all tests under this directory
     --reps=<n>            number of repeats for each program [1]
-    --tools=<t1,t2,t3>    tools to run (overrides .vgperf "tools" line)
+    --tools=<t1,t2,t3>    tools to run [Nulgrind and Memcheck]
     --vg                  Valgrind(s) to measure (can be specified multiple
                             times).  The "in-place" build is used.
                             [Valgrind in the current directory]
+
+  Any tools named in --tools must be present in all directories specified
+  with --vg.  (This is not checked.)
 END
 ;
 
@@ -77,12 +79,11 @@ my $prog;               # test prog
 my $args;               # test prog args
 my $prereq;             # prerequisite test to satisfy before running test
 my $cleanup;            # cleanup command to run
-my @tools;              # which tools are we measuring the program with
 
 # Command line options
 my $n_reps = 1;         # Run each test $n_reps times and choose the best one.
 my @vgdirs;             # Dirs of the various Valgrinds being measured.
-my $tools_specified = 0; # Indicates if --tools was given.
+my @tools = ("none", "memcheck");   # tools being measured
 
 my $num_tests_done   = 0;
 my $num_timings_done = 0;
@@ -120,14 +121,6 @@ sub validate_program ($$$$)
     return $prog;
 }
 
-sub validate_tools($)
-{
-    # XXX: should check they exist!
-    my ($toolnames) = @_;
-    my @t = split(/\s+/, $toolnames);
-    return @t;
-}
-
 sub add_vgdir($)
 {
     my ($vgdir) = @_;
@@ -153,7 +146,6 @@ sub process_command_line()
                 add_vgdir($1);
             } elsif ($arg =~ /^--tools=(.+)$/) {
                 @tools = split(/,/, $1);
-                $tools_specified = 1
             } else {
                 die $usage;
             }
@@ -199,11 +191,6 @@ sub read_vgperf_file($)
             $vgopts = $1;
         } elsif ($line =~ /^\s*prog:\s*(.*)$/) {
             $prog = validate_program(".", $1, 1, 1);
-        } elsif ($line =~ /^\s*tools:\s*(.*)$/) {
-            # Only use the "tools:" line if --tools wasn't specified.
-            if ($tools_specified == 0) {
-                @tools = validate_tools($1);
-            }
         } elsif ($line =~ /^\s*args:\s*(.*)$/) {
             $args = $1;
         } elsif ($line =~ /^\s*prereq:\s*(.*)$/) {