| ##=== TEST.dsgraph.report - Report description for dsgraph -----*- perl -*-===## |
| # |
| # This file defines a report to be generated for the dsgraph test. |
| # |
| ##===----------------------------------------------------------------------===## |
| |
| $SortNumeric = 1; # Sort numerically, not textually. |
| $TrimAllDirectories = 1; # Trim off benchmark directories. |
| $SortCol = 2; # Sort by #MemInstrs |
| $SortReverse = 1; # Sort in descending order |
| |
| |
| # Helper function |
| sub Ratio { |
| my ($Cols, $Col) = @_; |
| if ($Cols->[$Col-2] ne "*" and |
| $Cols->[$Col-2] != "0") { |
| return $Cols->[$Col-1]/$Cols->[$Col-2]; |
| } else { |
| return "n/a"; |
| } |
| } |
| |
| sub TypeSafeRatio { |
| my ($Cols, $Col) = @_; |
| my $TS = $Cols->[$Col-2]; |
| my $NTS = $Cols->[$Col-1]; |
| $TS = 0 if ($TS eq "*"); |
| $NTS = 0 if ($NTS eq "*"); |
| |
| if ($TS + NTS != 0) { |
| return sprintf("%4.1f%%", 100*$TS/($TS+$NTS+0.0)); |
| } else { |
| return "n/a"; |
| } |
| } |
| |
| sub FormatSize { |
| my $Size = shift; |
| if ($Size > 10*1024*1024) { |
| return (int $Size*10 / (1024*1024))/10 . "MB"; |
| } elsif ($Size > 10*1024) { |
| return (int $Size / 1024); |
| } else { |
| return $Size . "B"; |
| } |
| } |
| |
| sub NoStar { |
| return "0" if ($_[0] eq '*'); |
| return $_[0]; |
| } |
| |
| sub NoCallNodes { |
| $_[0] =~ m/([0-9]+)\+/; |
| return $1; |
| } |
| |
| # For latex output, limit benchmarks and rename as appropriate |
| @LatexRowMapOrder = ( |
| '-' => '-', |
| |
| '181.mcf' => '181.mcf', |
| '256.bzip2' => '256.bzip2', |
| '164.gzip' => '164.gzip', |
| '175.vpr' => '175.vpr', |
| '197.parser' => '197.parser', |
| '186.crafty' => '186.crafty', |
| '300.twolf' => '300.twolf', |
| '255.vortex' => '255.vortex', |
| '254.gap' => '254.gap', |
| '252.eon' => '252.eon', |
| '253.perlbmk' => '253.perlbmk', |
| '176.gcc' => '176.gcc', |
| '-' => '-', |
| '179.art' => '179.art', |
| '183.equake' => '183.equake', |
| '171.swim' => '171.swim', |
| '172.mgrid' => '172.mgrid', |
| '168.wupwise' => '168.wupwise', |
| '173.applu' => '173.applu', |
| '188.ammp' => '188.ammp', |
| '177.mesa' => '177.mesa', |
| '-' => '-', |
| '129.compress' => '129.compress', |
| '130.li' => '130.li', |
| '124.m88ksim' => '124.m88ksim', |
| '132.ijpeg' => '132.ijpeg', |
| '099.go' => '099.go', |
| '134.perl' => '134.perl', |
| '147.vortex' => '147.vortex', |
| '126.gcc' => '126.gcc', |
| '-' => '-', |
| '102.swim' => '102.swim', |
| '101.tomcatv' => '101.tomcatv', |
| '107.mgrid' => '107.mgrid', |
| '145.fpppp' => '145.fpppp', |
| '104.hydro2d' => '104.hydro2d', |
| '110.applu' => '110.applu', |
| '103.su2cor' => '103.su2cor', |
| '146.wave5' => '146.wave5', |
| '-' => '-', |
| 'fpgrowth' => 'fpgrowth', |
| 'bsim' => 'boxed-sim', |
| 'namd' => 'NAMD', |
| 'povray' => 'povray31', |
| ); |
| |
| @LxxatexColumns = (1, 2, 19, # LOC, #MemInstrs, MaxSCC |
| 15,16, # Total/Collapsed nodes |
| 17, 18); # Max Size, GG Size |
| |
| @LatexColumns = (2, 21, 22, 23); # Type safety numbers |
| |
| |
| # Specify how to format columns nicely for printing... |
| %LatexColumnFormat = ( |
| # 11 => \&FormatSize, |
| # 12 => \&FormatSize, |
| 16 => \&NoStar, |
| 15 => \&NoCallNodes, |
| 18 => \&NoCallNodes |
| ); |
| |
| @Graphs = (["scatter", "timeVmem.txt", 27, 7], |
| ["scatter", "timeVloc.txt", 1, 7]); |
| |
| |
| # These are the columns for the report. The first entry is the header for the |
| # column, the second is the regex to use to match the value. Empty list create |
| # seperators, and closures may be put in for custom processing. |
| |
| my $USERSYSTTIME = '([0-9.]+)[ 0-9.]+\([^)]+\)[ 0-9.]+\([^)]+\) +'; |
| ( |
| # Name |
| ["Name:" , '\'([^\']+)\' Program'], |
| ["LOC:" , 'LOC: *([0-9]+)'], |
| ["MemInsts", '([0-9]+).*Number of memory instructions'], |
| [], |
| # Times |
| ["LocTm:", "${USERSYSTTIME}Local"], |
| ["BUTim:", "${USERSYSTTIME}Bottom"], |
| ["TDTim:", "${USERSYSTTIME}Top"], |
| ["SumTm:", sub { return SumCols(@_, 3); }], |
| ["SteTm:", "${USERSYSTTIME}Steensgaard"], |
| [], |
| # Sizes |
| ["LcSize:" , '([0-9]+) Local'], |
| ["BUSize:" , '([0-9]+) Bottom-up'], |
| ["TDSize:" , '([0-9]+) Top-down'], |
| ["BUTDSz:" , sub { return SumCols(@_, 2); }], |
| [], |
| # Misc stuff |
| ["NumNodes", 'Graphs contain \\[([0-9+]+)\\] nodes total'], |
| ["NumFold" , '([0-9]+).*Number of folded nodes '], |
| ["MaxSz" , '([0-9]+).*Maximum graph size'], |
| ["GlobGr" , '\\.GlobalsGraph\\.dot\'... \\[([0-9+]+)\\]'], |
| ["MaxSCC" , '([0-9]+).*Maximum SCC Size in Call Graph'], |
| [], |
| ["TypeSafe", "ACCESSES TYPED: *([0-9]+)"], |
| ["NonType", "ACCESSES UNTYPED: *([0-9]+)"], |
| ["TS %" , sub { return TypeSafeRatio(@_); }], |
| [] |
| ); |