|
From: <sv...@va...> - 2006-11-03 19:37:56
|
Author: njn
Date: 2006-11-03 19:37:50 +0000 (Fri, 03 Nov 2006)
New Revision: 6344
Log:
Just use the first two letters of the toolname as the abbreviation.
Saves having to maintain a table of toolnames and abbreviations.
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-03 19:35:20 UTC (rev 6343)
+++ trunk/perf/vg_perf.in 2006-11-03 19:37:50 UTC (rev 6344)
@@ -78,14 +78,6 @@
my $cleanup; # cleanup command to run
my @tools; # which tools are we measuring the program with
=20
-# Abbreviations used in output
-my %toolnames =3D (=20
- none =3D> "nl",
- memcheck =3D> "mc",
- cachegrind =3D> "cg",
- massif =3D> "ms"
-);
-
# 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.
@@ -298,14 +290,15 @@
printf("%4.2fs", $tNative);
=20
foreach my $tool (@tools) {
- (defined $toolnames{$tool}) or=20
- die "unknown tool $tool, please add to %toolnames\n";
+ # First two chars of toolname for abbreviation
+ my $tool_abbrev =3D $tool;
+ $tool_abbrev =3D~ s/(..).*/$1/;
=20
# Do the tool run(s). Set both VALGRIND_LIB and VALGRIND_LI=
B_INNER
# in case this Valgrind was configured with --enable-inner. =
And
# also VALGRINDLIB, which was the old name for the variable,=
to
# allow comparison against old Valgrind versions (eg. 2.4.X)=
.
- printf(" %s:", $toolnames{$tool});
+ printf(" %s:", $tool_abbrev);
my $vgsetup =3D "VALGRINDLIB=3D$vgdir/.in_place "
. "VALGRIND_LIB=3D$vgdir/.in_place "
. "VALGRIND_LIB_INNER=3D$vgdir/.in_place ";
|