1. 16 Jan, 2019 10 commits
  2. 15 Jan, 2019 5 commits
  3. 14 Jan, 2019 8 commits
  4. 13 Jan, 2019 4 commits
  5. 12 Jan, 2019 3 commits
    • Ömer Sinan Ağacan's avatar
      Fix negative mutator time in GC stats in prof builds · 19670bc3
      Ömer Sinan Ağacan authored
      Because garbage collector calls `retainerProfile()` and `heapCensus()`,
      GC times normally include some of PROF times too. To fix this we have
      these lines:
      
          // heapCensus() is called by the GC, so RP and HC time are
          // included in the GC stats.  We therefore subtract them to
          // obtain the actual GC cpu time.
          stats.gc_cpu_ns      -=  prof_cpu;
          stats.gc_elapsed_ns  -=  prof_elapsed;
      
      These variables are later used for calculating GC time excluding the
      final GC (which should be attributed to EXIT).
      
          exit_gc_elapsed      = stats.gc_elapsed_ns - start_exit_gc_elapsed;
      
      The problem is if we subtract PROF times from `gc_elapsed_ns` and then
      subtract `start_exit_gc_elapsed` from the result, we end up subtracting
      PROF times twice, because `start_exit_gc_elapsed` also includes PROF
      times.
      
      We now subtract PROF times from GC after the calculations for EXIT and
      MUT times. The existing assertion that checks
      
          INIT + MUT + GC + EXIT = TOTAL
      
      now holds. When we subtract PROF numbers from GC, and a new assertion
      
          INIT + MUT + GC + PROF + EXIT = TOTAL
      
      also holds.
      
      Fixes #15897. New assertions added in this commit also revealed #16102,
      which is also fixed by this commit.
      19670bc3
    • Ömer Sinan Ağacan's avatar
      Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtime · 74cd4ec5
      Ömer Sinan Ağacan authored
      UNDERFLOW_FRAMEs don't have profiling headers so we have to use the
      AP_STACK's function's CCS as the new frame's CCS.
      
      Fixes one of the many bugs caught by concprog001 (#15508).
      74cd4ec5
    • Ömer Sinan Ağacan's avatar
      Documentation and refactoring in CCS related code · cb2349a4
      Ömer Sinan Ağacan authored
      - Remove REGISTER_CC and REGISTER_CCS macros, add functions registerCC
        and registerCCS to Profiling.c.
      
      - Reduce scope of symbols: CC_LIST, CCS_LIST, CC_ID, CCS_ID
      
      - Document CC_LIST and CCS_LIST
      cb2349a4
  6. 11 Jan, 2019 2 commits
  7. 10 Jan, 2019 1 commit
  8. 09 Jan, 2019 1 commit
    • Matthew Pickering's avatar
      Hadrian: Add support for building stage3 · 6486c6e4
      Matthew Pickering authored
      This ticket enables the building of a `stage3` compiler by making the
      build logic more consistent and predictable in Hadrian.
      
      Two of the main changes are:
      
      1. In order to build anything at stageN we use the package database
      present at stageN. Fixing #16069
      2. `haddock` and `ghc-tags` are built
      as stage1 executables (with the stage1 compiler) rather than as
      stage2 compiler. Fixing
      [hadrian#661](https://github.com/snowleopard/hadrian/issues/661)
      
      In order to build a stage3 compiler, you have to set the new `finalStage` hadrian option to `Stage3`.
      6486c6e4
  9. 08 Jan, 2019 1 commit
    • Ryan Scott's avatar
      Be pickier about unsaturated synonyms in :kind · 6b70cf61
      Ryan Scott authored
      Summary:
      We currently permit any and all uses of unsaturated type
      synonyms and type families in GHCi's `:kind` command, which allows
      strange interactions like this one:
      
      ```
      > :set -XTypeFamilies -XPolyKinds
      > type family Id (a :: k)
      > type instance Id a = a
      > type Foo x = Maybe
      > :kind! Id Foo
      ```
      
      This is probably a stretch too far, so this patch moves to disallow
      unsaturated synonyms that aren't at the top level (we still want to
      allow `:kind Id`, for instance). We do this by augmenting `GhciCtxt`
      with an additional `Bool` field to indicate if we are at the
      outermost level of the type being passed to `:kind` or not. See
      `Note [Unsaturated type synonyms in GHCi]` in `TcValidity` for the
      full story.
      
      Test Plan: make test TEST=T16013
      
      Reviewers: goldfire, bgamari
      
      Reviewed By: goldfire
      
      Subscribers: simonpj, goldfire, rwbarton, carter
      
      GHC Trac Issues: #16013
      
      Differential Revision: https://phabricator.haskell.org/D5471
      6b70cf61
  10. 07 Jan, 2019 3 commits
    • Alec Theriault's avatar
      Check that libs found by GCC aren't folders · 6b5ec08a
      Alec Theriault authored
      Summary:
      We use 'gcc -B<base-location> --print-file-name mylib.a' as a way of
      checking if 'gcc' can discover 'mylib.a' at the given location. However,
      this can break down if there is a folder caller 'mylib.a' that 'gcc' can
      discover. We can guard against this by explicitly checking that the path
      returned by 'gcc' is a file.
      
      This may seem like a far-fetched scenario, but since
      3d17f1f1, we look for libraries without
      any prefix or suffix (ie. 'extra-libraries: softfloat', we look for just
      'softfloat' as well as 'softloat.a', 'softfloat.dll.a', etc.) which means
      that there might actusally be a folder of that name in one of the base
      locations.
      
      Reviewers: Phyx, bgamari, hvr, angerman
      
      Reviewed By: Phyx, angerman
      
      Subscribers: angerman, rwbarton, carter
      
      GHC Trac Issues: #16063
      
      Differential Revision: https://phabricator.haskell.org/D5462
      6b5ec08a
    • Ben Gamari's avatar
      fix-submodules: Rip out typing · 1c9dab22
      Ben Gamari authored
      Debian Jessie only runs Python 3.4, whereas typing was introduced in Python 3.5.
      1c9dab22
    • Ben Gamari's avatar
      gitlab-ci: Clone haddock from its upstream repository · c0448c18
      Ben Gamari authored
      This ensures that changes requiring haddock changes can be built under CI.
      c0448c18
  11. 06 Jan, 2019 2 commits
    • Zejun Wu's avatar
      Hadrian: merge sections in profiling _p.a to .p_o for ghci · 9ea8dcea
      Zejun Wu authored
      This is the hadrain version of {D5169}
      
      * We build squashed .o and .p_o for ghci when `dynamicGhcPrograms` is
      `False`
      * We no longer build them for rts as ghci never loads it
      
      we need https://github.com/haskell/cabal/pull/5592 for cabal to copy
      the built `.p_o` file.
      
      Test Plan:
      ```
      $ grep dynamicGhc hadrian/UserSettings.hs
        , dynamicGhcPrograms = return False
      $ touch ...
      $ hadrian/build.sh --flavour=user -j --digest-or
      $ find _build/stage1/libraries/ -name 'HS*-*.*o' | wc
           62      62    3664
      ```
      
      ```
      $ grep -C3 dynamicGhc hadrian/UserSettings.hs
      userFlavour :: Flavour
      userFlavour = performanceFlavour
        { name = "user"
        , dynamicGhcPrograms = return False
        }
      $ hadrian/build.sh -j --flavour=user test --verbose
      Unexpected results from:
      TEST="T3807 T9208 T9293 annth_make ghci057 haddock.Cabal haddock.base
      haddock.compiler"
      
      SUMMARY for test run started at Wed Dec  5 17:45:39 2018 PST
       0:03:16 spent to go through
          6708 total tests, which gave rise to
         26015 test cases, of which
         19290 were skipped
      
            29 had missing libraries
          6600 expected passes
            88 expected failures
      
             3 caused framework failures
             0 caused framework warnings
             1 unexpected passes
             7 unexpected failures
             0 unexpected stat failures
      $ find _build -name 'HSbase*.*o'
      _build/stage1/lib/x86_64-linux-ghc-8.7.20181204/base-4.12.0.0/HSbase-4.1
      2.0.0.o
      _build/stage1/lib/x86_64-linux-ghc-8.7.20181204/base-4.12.0.0/HSbase-4.1
      2.0.0.p_o
      _build/stage1/libraries/base/build/HSbase-4.12.0.0.o
      _build/stage1/libraries/base/build/HSbase-4.12.0.0.p_o
      ```
      
      Reviewers: bgamari, simonmar, snowleopard
      
      Reviewed By: snowleopard
      
      Subscribers: alpmestan, rwbarton, carter
      
      GHC Trac Issues: #15779
      
      Differential Revision: https://phabricator.haskell.org/D5270
      9ea8dcea
    • Ryan Scott's avatar
      bbd58fb5