|
From: <sv...@va...> - 2006-11-22 00:39:23
|
Author: njn
Date: 2006-11-22 00:39:08 +0000 (Wed, 22 Nov 2006)
New Revision: 6363
Log:
Add a useful --tools option to vg_perf, which lets you override the "tool=
s"
line in the .vgperf files from the command line.
Modified:
trunk/perf/vg_perf.in
Modified: trunk/perf/vg_perf.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/perf/vg_perf.in 2006-11-20 22:02:40 UTC (rev 6362)
+++ trunk/perf/vg_perf.in 2006-11-22 00:39:08 UTC (rev 6363)
@@ -63,7 +63,8 @@
options for the user, with defaults in [ ], are:
-h --help show this message
--all run all tests under this directory
- --reps number of repeats for each program [3]
+ --reps=3D<n> number of repeats for each program [1]
+ --tools=3D<t1,t2,t3> tools to run (overrides .vgperf "tools" line=
)
--vg Valgrind(s) to measure (can be specified multi=
ple
times). The "in-place" build is used.
[Valgrind in the current directory]
@@ -79,8 +80,9 @@
my @tools; # which tools are we measuring the program with
=20
# Command line options
-my $n_reps =3D 1; # Run each program $n_reps times and choose the be=
st one.
-my @vgdirs; # Dirs of the various Valgrinds being measured.
+my $n_reps =3D 1; # Run each test $n_reps times and choose the b=
est one.
+my @vgdirs; # Dirs of the various Valgrinds being measured.
+my $tools_specified =3D 0; # Indicates if --tools was given.
=20
my $num_tests_done =3D 0;
my $num_timings_done =3D 0;
@@ -149,6 +151,9 @@
} elsif ($arg =3D~ /^--vg=3D(.+)$/) {
# Make dir absolute if not already
add_vgdir($1);
+ } elsif ($arg =3D~ /^--tools=3D(.+)$/) {
+ @tools =3D split(/,/, $1);
+ $tools_specified =3D 1
} else {
die $usage;
}
@@ -195,7 +200,10 @@
} elsif ($line =3D~ /^\s*prog:\s*(.*)$/) {
$prog =3D validate_program(".", $1, 1, 1);
} elsif ($line =3D~ /^\s*tools:\s*(.*)$/) {
- @tools =3D validate_tools($1);
+ # Only use the "tools:" line if --tools wasn't specified.
+ if ($tools_specified =3D=3D 0) {
+ @tools =3D validate_tools($1);
+ }
} elsif ($line =3D~ /^\s*args:\s*(.*)$/) {
$args =3D $1;
} elsif ($line =3D~ /^\s*prereq:\s*(.*)$/) {
|