cvsuser 04/08/24 23:40:10
Modified: src dod.c
tools/dev parrotbench.pl
Log:
updated parrotbench.pl
Revision Changes Path
1.129 +2 -5 parrot/src/dod.c
Index: dod.c
===================================================================
RCS file: /cvs/public/parrot/src/dod.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -w -r1.128 -r1.129
--- dod.c 19 Aug 2004 11:48:18 -0000 1.128
+++ dod.c 25 Aug 2004 06:40:05 -0000 1.129
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: dod.c,v 1.128 2004/08/19 11:48:18 leo Exp $
+$Id: dod.c,v 1.129 2004/08/25 06:40:05 leo Exp $
=head1 NAME
@@ -265,10 +265,7 @@
struct Arenas *arena_base = interpreter->arena_base;
- /* Pointer to the currently being processed PMC
- *
- * initialize locals to zero, so no garbage is on stack
- *
+ /*
* note: adding locals here did cause increased DOD runs
*/
unsigned int i = 0;
1.4 +13 -5 parrot/tools/dev/parrotbench.pl
Index: parrotbench.pl
===================================================================
RCS file: /cvs/public/parrot/tools/dev/parrotbench.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- parrotbench.pl 10 Mar 2004 11:11:50 -0000 1.3
+++ parrotbench.pl 25 Aug 2004 06:40:10 -0000 1.4
@@ -19,7 +19,8 @@
parrotbench [options]
Options:
- -b -benchmarks only use benchmarks matching regex
+ -b -benchmarks use benchmarks matching regex
+ -n -nobench skip benchmarks matching regex
-c -conf path to configuration file
-d -directory path to benchmarks directory
-e -executables only use executables matching regex
@@ -50,6 +51,7 @@
=cut
my $benchmarks = '.*';
+my $nobench = '[^\d\D]'; # Need to make sure it fails if not user-defined
my $conf = "$FindBin::Bin/parrotbench.conf";
my $directory = "$FindBin::Bin/../../examples/benchmarks";
my $executables = '.*';
@@ -59,6 +61,7 @@
GetOptions
'benchmarks=s' => \$benchmarks,
+ 'nobench=s' => \$nobench,
'conf=s' => \$conf,
'directory=s' => \$directory,
'executables=s' => \$executables,
@@ -74,8 +77,9 @@
or die "Unable to open configuration file \"$conf\"";
my ( @names, %pathes, %suffixes, @suffixes );
my $i = 0;
-while (<$file>) {
- if (/^\s*(.*):\s*(.*):\s*(.*)$/) {
+while (<$file>) { # This really should be a Config:: module
+ chomp;
+ if (/^\s*([^:]+):\s*([^:]+):\s*([^:]+)$/) { # Death to .*
my $name = $1;
my $path = $2;
my $suffixes = $3;
@@ -89,6 +93,10 @@
$i++;
}
}
+ if ( /^NOBENCH\s*=\s*(.+)$/ ) { # Added because I couldn't pass to the shell
correctly
+ $nobench = $1; # This code probably shouldn't even exist
+ $nobench =~ tr/\015//d; # Looks like it turned out to be a
Cygwin/Win32 thing
+ }
}
$file->close;
@@ -96,9 +104,9 @@
my ( %list, %tree );
find sub {
foreach my $suffix ( keys %suffixes ) {
- if (/(\w*)\.$suffix/) {
+ if (/([\w-]+)\.$suffix/) { # added - to make hyphens in file names work
my $benchmark = $1;
- if ( $benchmark =~ /$benchmarks/ ) {
+ if ( $benchmark =~ /$benchmarks/ && $benchmark !~ /$nobench/ ) { #
Allow skipping
$list{$benchmark}++;
foreach my $name ( @{ $suffixes{$suffix} } ) {
$tree{$name}{$suffix}{$benchmark}++;