Changes between Version 11 and Version 12 of Debugging


Ignore:
Timestamp:
Dec 17, 2009 3:05:27 PM (5 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Debugging

    v11 v12  
    2727   * [wiki:Building/Troubleshooting]: Fixing common problems in a GHC build 
    2828   * [wiki:Building/Modifying#Debugging]: Debugging the build system 
     29 
     30-------------------- 
     31== count_lines == 
     32 
     33The `count_lines` script, which is put in `$(TOP)/inplace/bin`, counts source lines and comments. The command-line arguments are the Haskell source files to count. 
     34{{{ 
     35bash-3.2$ $head/count_lines compiler/*/*hs 
     36 
     37                      Code  Comments 
     38compiler/basicTypes    4565   5092 
     39compiler/cmm           9685   4703 
     40... 
     41compiler/utils         6316   4669 
     42compiler/vectorise     2608    669 
     43 
     44TOTAL:               105893  86247 
     45 
     46                      Code  Comments 
     47Annotations.lhs          57     44 
     48AsmCodeGen.lhs          591    333 
     49Bag.lhs                 140     51 
     50.... 
     51ZipCfgExtras.hs          43     33 
     52ZipDataflow.hs          779    271 
     53 
     54TOTAL:               105893  86247 
     55}}} 
     56The source for `count_lines` is in `$(TOP)/utils/count_lines`. 
     57 
     58== compareSizes == 
     59 
     60The `compareSizes` program compares the sizes of corresponding files in two trees: 
     61{{{ 
     62$ ./compareSizes --hi ~/ghc/darcs/ghc ~/ghc/6.12-branch/ghc 
     63        Size | Change | Filename 
     64      25644 | -0.99% | compiler/stage1/build/Demand.hi 
     65      21103 | -0.98% | compiler/stage2/build/Demand.hi 
     66     180044 | -0.98% | libraries/base/dist-install/build/GHC/Classes.hi 
     67       6415 | -0.58% | .../Data/Array/Parallel/Prelude/Base/Tuple.hi 
     68       6507 | -0.57% | .../Data/Array/Parallel/Prelude/Base/Tuple.hi 
     69   [...] 
     70       3264 |  3.16% | .../Parallel/Unlifted/Sequential/Flat/Enum.hi 
     71      51389 |  3.30% | .../build/Language/Haskell/Extension.hi 
     72       1415 | 72.18% | libraries/base/dist-install/build/Data/Tuple.hi 
     73   28752162 | -0.00% | TOTAL 
     74}}} 
     75Flags: 
     76 * `--o` to compare object files. 
     77 * `--hi` to compare interface files [DEFAULT] 
     78 
     79There's a hack to avoid descending into '*_split' directories.  
     80 
     81The source for `compareSizes` is in `$(TOP)/utils/compare_sizes`.