1. 09 Jun, 2016 4 commits
  2. 08 Jun, 2016 6 commits
    • Ömer Sinan Ağacan's avatar
      Show sources of cost centers in .prof · d7933cbc
      Ömer Sinan Ağacan authored
      This fixes the problem with duplicate cost-centre names that was
      reported a couple of times before. When a module implements a typeclass
      multiple times for different types, methods of different implementations
      get same cost-centre names and are reported like this:
      
          COST CENTRE MODULE            %time %alloc
      
          CAF         GHC.IO.Handle.FD    0.0   32.8
          CAF         GHC.Read            0.0    1.0
          CAF         GHC.IO.Encoding     0.0    1.8
          showsPrec   Main                0.0    1.2
          readPrec    Main                0.0   19.4
          readPrec    Main                0.0   20.5
          main        Main                0.0   20.2
      
                                                  individual      inherited
          COST CENTRE  MODULE  no.     entries  %time %alloc   %time %alloc
      
          MAIN         MAIN     53          0    0.0    0.2     0.0  100.0
           CAF         Main    105          0    0.0    0.3     0.0   62.5
            readPrec   Main    109          1    0.0    0.6     0.0    0.6
            readPrec   Main    107          1    0.0    0.6     0.0    0.6
            main       Main    106          1    0.0   20.2     0.0   61.0
             ==        Main    114          1    0.0    0.0     0.0    0.0
             ==        Main    113          1    0.0    0.0     0.0    0.0
             showsPrec Main    112          2    0.0    1.2     0.0    1.2
             showsPrec Main    111          2    0.0    0.9     0.0    0.9
             readPrec  Main    110          0    0.0   18.8     0.0   18.8
             readPrec  Main    108          0    0.0   19.9     0.0   19.9
      
      It's not possible to tell from the report which `==` took how long. This
      patch adds one more column at the cost of making outputs wider. The
      report now looks like this:
      
          COST CENTRE MODULE           SRC                       %time %alloc
      
          CAF         GHC.IO.Handle.FD <entire-module>             0.0   32.9
          CAF         GHC.IO.Encoding  <entire-module>             0.0    1.8
          CAF         GHC.Read         <entire-module>             0.0    1.0
          showsPrec   Main             Main_1.hs:7:19-22           0.0    1.2
          readPrec    Main             Main_1.hs:7:13-16           0.0   19.5
          readPrec    Main             Main_1.hs:4:13-16           0.0   20.5
          main        Main             Main_1.hs:(10,1)-(20,20)    0.0   20.2
      
                                                                             individual      inherited
          COST CENTRE  MODULE        SRC                      no. entries  %time %alloc   %time %alloc
      
          MAIN         MAIN          <built-in>                53      0    0.0    0.2     0.0  100.0
           CAF         Main          <entire-module>          105      0    0.0    0.3     0.0   62.5
            readPrec   Main          Main_1.hs:7:13-16        109      1    0.0    0.6     0.0    0.6
            readPrec   Main          Main_1.hs:4:13-16        107      1    0.0    0.6     0.0    0.6
            main       Main          Main_1.hs:(10,1)-(20,20) 106      1    0.0   20.2     0.0   61.0
             ==        Main          Main_1.hs:7:25-26        114      1    0.0    0.0     0.0    0.0
             ==        Main          Main_1.hs:4:25-26        113      1    0.0    0.0     0.0    0.0
             showsPrec Main          Main_1.hs:7:19-22        112      2    0.0    1.2     0.0    1.2
             showsPrec Main          Main_1.hs:4:19-22        111      2    0.0    0.9     0.0    0.9
             readPrec  Main          Main_1.hs:7:13-16        110      0    0.0   18.8     0.0   18.8
             readPrec  Main          Main_1.hs:4:13-16        108      0    0.0   19.9     0.0   19.9
           CAF         Text.Read.Lex <entire-module>          102      0    0.0    0.5     0.0    0.5
      
      To fix failing test cases because of different orderings of cost centres
      (e.g. optimized and non-optimized build printing in different order),
      with this patch we also start sorting cost centres before printing. The
      order depends on 1) entries (more entered cost centres come first) 2)
      names (using strcmp() on cost centre names).
      
      Reviewers: simonmar, austin, erikd, bgamari
      
      Reviewed By: simonmar, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2282
      
      GHC Trac Issues: #11543, #8473, #7105
      d7933cbc
    • Ömer Sinan Ağacan's avatar
      80cf4cf0
    • Ömer Sinan Ağacan's avatar
      Report term sizes with -v3 even when -ddump is enabled · c2bbc8ba
      Ömer Sinan Ağacan authored
      This is the proper fix for the problem I tried solve with D2310
      (committed as dd332459 and reverted in 44a3c182).
      
      Reviewers: austin, goldfire, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2315
      c2bbc8ba
    • Ömer Sinan Ağacan's avatar
      Revert "Desugar: Display resulting program stats with -v2" · 44a3c182
      Ömer Sinan Ağacan authored
      This reverts commit dd332459.
      
      It seems like we already have `endPassIO` calls here, which should print
      term sizes. For some reason they don't sometimes, and we need to
      understand why instead of adding more prints.
      44a3c182
    • Ömer Sinan Ağacan's avatar
      Desugar: Display resulting program stats with -v2 · dd332459
      Ömer Sinan Ağacan authored
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2310
      dd332459
    • niteria's avatar
      Add some determinism tests · d4b548ef
      niteria authored
      These are the tests that I accumulated fixing real issues.
      Each test is a separate thing that was broken and they are
      relatively small.
      
      GHC Trac: #4012
      d4b548ef
  3. 07 Jun, 2016 14 commits
  4. 06 Jun, 2016 9 commits
    • Alan Zimmerman's avatar
      Merge MatchFixity and HsMatchContext · a13cb279
      Alan Zimmerman authored
      Summary:
      MatchFixity was introduced to facilitate use of API Annotations.
      
      HsMatchContext does the same thing with more detail, but is chased
      through all over the place to provide context when processing a Match.
      
      Since we already have MatchFixity in the Match, it may as well provide
      the full context.
      
      updates submodule haddock
      
      Test Plan: ./validate
      
      Reviewers: austin, goldfire, bgamari
      
      Subscribers: thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D2271
      
      GHC Trac Issues: #12105
      
      (cherry picked from commit 306ecad5)
      a13cb279
    • niteria's avatar
      Make UnitIdMap a deterministic map · 1937ef1c
      niteria authored
      This impacts at least the order in which version macros are
      generated. It's pretty hard to track what kind of nondeterminism
      is benign and this should have no performance impact as the number
      of packages should be relatively small.
      
      Test Plan: ./validate
      
      Reviewers: simonmar, austin, bgamari, ezyang
      
      Reviewed By: ezyang
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2308
      
      GHC Trac Issues: #4012
      1937ef1c
    • niteria's avatar
      Kill foldUniqSet · 3e7a876a
      niteria authored
      I planned to just say that we don't care about this part.
      Turns out I was able to document away the uses in the codegenerator.
      
      Test Plan: ./validate
      
      Reviewers: simonmar, austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2307
      
      GHC Trac Issues: #4012
      3e7a876a
    • niteria's avatar
      Document putDictionary determinism · 46d2da00
      niteria authored
      Summary: Like explained in the comment it's OK here.
      
      Test Plan: ./validate
      
      Reviewers: simonmar, austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2306
      
      GHC Trac Issues: #4012
      46d2da00
    • niteria's avatar
      Kill nameSetElems · 31ba8d64
      niteria authored
      nameSetElems used `eltsUFM` which is nondeterministic.
      
      Test Plan: ./validate
      
      Reviewers: simonmar, austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2305
      
      GHC Trac Issues: #4012
      31ba8d64
    • niteria's avatar
      Desugar ApplicativeDo and RecDo deterministically · e684f546
      niteria authored
      This fixes a problem described in
      Note [Deterministic ApplicativeDo and RecursiveDo desugaring].
      
      Test Plan: ./validate + new testcase
      
      Reviewers: simonpj, bgamari, austin, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2287
      
      GHC Trac Issues: #4012
      e684f546
    • seraphime's avatar
      Add @since annotations to base instances · a90085bd
      seraphime authored
      Add @since annotations to instances in `base`.
      
      Test Plan:
       * ./validate  # some commets shouldn't break the build
       * review the annotations for absurdities.
      
      Reviewers: ekmett, goldfire, RyanGlScott, austin, hvr, bgamari
      
      Reviewed By: RyanGlScott, hvr, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2277
      
      GHC Trac Issues: #11767
      a90085bd
    • niteria's avatar
      Implement deterministic CallInfoSet · 48e9a1f5
      niteria authored
      We need CallInfoSet to be deterministic because it determines the
      order that the binds get generated.
      
      Currently it's not deterministic because it's keyed on
      `CallKey = [Maybe Type]` and `Ord CallKey` is implemented
      with `cmpType` which is nondeterministic.
      
      See Note [CallInfoSet determinism] for more details.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, bgamari, austin, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2242
      
      GHC Trac Issues: #4012
      48e9a1f5
    • niteria's avatar
      Use UniqDFM for HomePackageTable · 3042a9d8
      niteria authored
      This isn't strictly necessary for deterministic ABIs.
      The results of eltsHpt are consumed in two ways:
      1) they determine the order of linking
      2) if you track the data flow all the family instances get put in
         FamInstEnvs, so the nondeterministic order is forgotten.
      3) same for VectInfo stuff
      4) same for Annotations
      
      The problem is that I haven't found a nice way to do 2. in
      a local way and 1. is nice to have if we went for deterministic
      object files. Besides these maps are keyed on ModuleNames so they
      should be small relative to other things and the overhead should
      be negligible.
      
      As a bonus we also get more specific names.
      
      Test Plan: ./validate
      
      Reviewers: bgamari, austin, hvr, ezyang, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2300
      
      GHC Trac Issues: #4012
      3042a9d8
  5. 05 Jun, 2016 4 commits
  6. 04 Jun, 2016 3 commits