| ##=== TEST.fourway.report - Report description for llc tests ---*- perl -*-===## |
| # |
| # This file defines a report to be generated for the fourway-debuginfo test. |
| # |
| ##===----------------------------------------------------------------------===## |
| |
| # Sort by name |
| $SortCol = 1; |
| $TrimRepeatedPrefix = 1; |
| my $ExtTextSize = '(\d+)\s+\d+\s+\d+\s+\d+\s+\d+\s+[0-9a-fA-F]+'; |
| my $ExtDataSize = '\d+\s+(\d+)\s+\d+\s+\d+\s+\d+\s+[0-9a-fA-F]+'; |
| my $ExtObjSize = '\d+\s+\d+\s+(\d+)\s+\d+\s+\d+\s+[0-9a-fA-F]+'; |
| my $ExtOtherSize = '\d+\s+\d+\s+\d+\s+(\d+)\s+\d+\s+[0-9a-fA-F]+'; |
| my $ExtTotalSize = '\d+\s+\d+\s+\d+\s+\d+\s+(\d+)\s+[0-9a-fA-F]+'; |
| |
| sub Percentage { |
| my ($Cols, $Col) = @_; |
| my $GCC = $Cols->[$Col-2]; |
| my $LLVMGCC = $Cols->[$Col-1]; |
| return "n/a" if ($GCC eq "*" or $LLVMGCC eq "*"); |
| return sprintf("%5.1f%%", $LLVMGCC / $GCC * 100) |
| if ($GCC > 0 and $LLVMGCC > 0); |
| return " -"; |
| } |
| |
| # 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. |
| ( |
| # Name |
| ["Name:" , '\'([^\']+)\' Program'], |
| [], |
| # Text Sizes |
| ["Text GND", "${ExtTextSize}gcc.nodebug"], |
| ["Text GD", "${ExtTextSize}gcc.debug"], |
| ["Text LND", "${ExtTextSize}llvmgcc.nodebug"], |
| ["Text LD", "${ExtTextSize}llvmgcc.debug"], |
| [], |
| # Other Sizes |
| ["Debug* GCC", "${ExtOtherSize}gcc.debug"], |
| ["Debug* LLVM-GCC", "${ExtOtherSize}llvmgcc.debug"], |
| ["Debug* %", \&Percentage], |
| [], |
| # Total Sizes |
| ["Total GND", "${ExtTotalSize}gcc.nodebug"], |
| ["Total GD", "${ExtTotalSize}gcc.debug"], |
| ["Total LND", "${ExtTotalSize}llvmgcc.nodebug"], |
| ["Total LD", "${ExtTotalSize}llvmgcc.debug"], |
| [], |
| ); |