+
+# If we built the tree successfully, runs of the Olden suite with
+# LARGE_PROBLEM_SIZE on so that we can get some "running" statistics.
+if (!$BuildError) {
+ if ( $VERBOSE ) { print "OLDEN TEST SUITE STAGE\n"; }
+ my ($NATTime, $CBETime, $LLCTime, $JITTime, $OptTime, $BytecodeSize,
+ $MachCodeSize) = ("","","","","","","");
+ if (!$NORUNNINGTESTS) {
+ ChangeDir( "$BuildDir/llvm/projects/llvm-test/MultiSource/Benchmarks/Olden",
+ "Olden Test Directory");
+
+ # Clean out previous results...
+ system "$NICE gmake $MAKEOPTS clean > /dev/null 2>&1";
+
+ # Run the nightly test in this directory, with LARGE_PROBLEM_SIZE and
+ # GET_STABLE_NUMBERS enabled!
+ system "gmake -k $MAKEOPTS $PROGTESTOPTS report.nightly.raw.out TEST=nightly " .
+ " LARGE_PROBLEM_SIZE=1 GET_STABLE_NUMBERS=1 > /dev/null 2>&1";
+ system "cp report.nightly.raw.out $OldenTestsLog";
+ } else {
+ system "gunzip ${OldenTestsLog}.gz";
+ }
+
+ # Now we know we have $OldenTestsLog as the raw output file. Split
+ # it up into records and read the useful information.
+ my @Records = split />>> ========= /, ReadFile "$OldenTestsLog";
+ shift @Records; # Delete the first (garbage) record
+
+ # Loop over all of the records, summarizing them into rows for the running
+ # totals file.
+ my $WallTimeRE = "Time: ([0-9.]+) seconds \\([0-9.]+ wall clock";
+ foreach $Rec (@Records) {
+ my $rNATTime = GetRegex 'TEST-RESULT-nat-time: program\s*([.0-9m]+)', $Rec;
+ my $rCBETime = GetRegex 'TEST-RESULT-cbe-time: program\s*([.0-9m]+)', $Rec;
+ my $rLLCTime = GetRegex 'TEST-RESULT-llc-time: program\s*([.0-9m]+)', $Rec;
+ my $rJITTime = GetRegex 'TEST-RESULT-jit-time: program\s*([.0-9m]+)', $Rec;
+ my $rOptTime = GetRegex "TEST-RESULT-compile: .*$WallTimeRE", $Rec;
+ my $rBytecodeSize = GetRegex 'TEST-RESULT-compile: *([0-9]+)', $Rec;
+ my $rMachCodeSize = GetRegex 'TEST-RESULT-jit-machcode: *([0-9]+).*bytes of machine code', $Rec;
+
+ $NATTime .= " " . FormatTime($rNATTime);
+ $CBETime .= " " . FormatTime($rCBETime);
+ $LLCTime .= " " . FormatTime($rLLCTime);
+ $JITTime .= " " . FormatTime($rJITTime);
+ $OptTime .= " $rOptTime";
+ $BytecodeSize .= " $rBytecodeSize";
+ $MachCodeSize .= " $rMachCodeSize";
+ }
+
+ # Now that we have all of the numbers we want, add them to the running totals
+ # files.
+ AddRecord($NATTime, "running_Olden_nat_time.txt");
+ AddRecord($CBETime, "running_Olden_cbe_time.txt");
+ AddRecord($LLCTime, "running_Olden_llc_time.txt");
+ AddRecord($JITTime, "running_Olden_jit_time.txt");
+ AddRecord($OptTime, "running_Olden_opt_time.txt");
+ AddRecord($BytecodeSize, "running_Olden_bytecode.txt");
+ AddRecord($MachCodeSize, "running_Olden_machcode.txt");
+
+ system "gzip -f $OldenTestsLog";
+}
+
+