1. 21 Aug, 2018 5 commits
  2. 08 Aug, 2018 1 commit
  3. 06 Aug, 2018 1 commit
  4. 01 Aug, 2018 1 commit
  5. 31 Jul, 2018 2 commits
  6. 27 Jul, 2018 3 commits
    • Ben Gamari's avatar
      rts: More forceful cc debugging flags · ccdc0328
      Ben Gamari authored
      Reviewers: simonmar, alpmestan
      
      Reviewed By: alpmestan
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4999
      ccdc0328
    • Simon Marlow's avatar
      Fix gcCAFs() · e431d75f
      Simon Marlow authored
      The test here should have been changed after D1106.  It was harmless
      but we caught fewer GC'd CAFs than we should have.
      
      Test Plan:
      Using `nofib/imaginary/primes` compiled with `-debug`.
      
      Before:
      ```
      > ./primes 100 +RTS -G1 -A32k -DG
      CAF gc'd at 0x0x7b0960
      CAF gc'd at 0x0x788728
      CAF gc'd at 0x0x790db0
      CAF gc'd at 0x0x790de0
      12 CAFs live
      CAF gc'd at 0x0x788880
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      547
      CAF gc'd at 0x0x7995c8
      13 CAFs live
      ```
      
      After:
      
      ```
      > ./primes 100 +RTS -G1 -A32k -DG
      CAF gc'd at 0x0x7b0960
      CAF gc'd at 0x0x788728
      CAF gc'd at 0x0x790db0
      CAF gc'd at 0x0x790de0
      12 CAFs live
      CAF gc'd at 0x0x788880
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      547
      CAF gc'd at 0x0x7995c8
      CAF gc'd at 0x0x790ea0
      12 CAFs live
      ```
      
      Reviewers: bgamari, osa1, erikd, noamz
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4963
      e431d75f
    • Mitsutoshi Aoe's avatar
      rts: Flush eventlog in hs_init_ghc (fixes #15440) · 7a3e1b25
      Mitsutoshi Aoe authored
      Without this change RTS typically doesn't flush some important
      events until the process terminates or it doesn't write them at
      all in case it terminates abnormally.
      
      Here is a list of such events:
      
      * EVENT_WALL_CLOCK_TIME
      * EVENT_OS_PROCESS_PID
      * EVENT_OS_PROCESS_PPID
      * EVENT_RTS_IDENTIFIER
      * EVENT_PROGRAM_ARGS
      * EVENT_PROGRAM_ENV
      7a3e1b25
  7. 18 Jul, 2018 1 commit
    • Sergei Trofimovich's avatar
      fix osReserveHeapMemory block alignment · e175aaf6
      Sergei Trofimovich authored
      Before the change osReserveHeapMemory() attempted
      to allocate chunks of memory via osTryReserveHeapMemory()
      not multiple of MBLOCK_SIZE in the following fallback code:
      
      ```
          if (at == NULL) {
              *len -= *len / 8;
      ```
      
      and caused assertion failure:
      
      ```
      $ make fulltest TEST=T11607 WAY=threaded1
      T11607: internal error: ASSERTION FAILED: file rts/posix/OSMem.c, line 457
          (GHC version 8.7.20180716 for riscv64_unknown_linux)
      
      ```
      
      The change applies alignment mask before each MBLOCK allocation attempt
      and fixes WAY=threaded1 test failures on qemu-riscv64.
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      
      Test Plan: run 'make fulltest WAY=threaded1'
      
      Reviewers: simonmar, bgamari, erikd
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4982
      e175aaf6
  8. 16 Jul, 2018 1 commit
    • Simon Marlow's avatar
      Support the GHCi debugger with -fexternal-interpreter · 3bdf0d01
      Simon Marlow authored
      * All the tests in tests/ghci.debugger now pass with
        -fexternal-interpreter. These tests are now run with the ghci-ext way
        in addition to the normal way so we won't break it in the future.
      
      * I removed all the unsafeCoerce# calls from RtClosureInspect. Yay!
      
      The main changes are:
      
      * New messages: GetClosure and Seq.  GetClosure is a remote interface to
        GHC.Exts.Heap.getClosureData, which required Binary instances for
        various datatypes. Fortunately this wasn't too painful thanks to
        DeriveGeneric.
      
      * No cheating by unsafeCoercing values when printing them. Now we have
        to turn the Closure representation back into the native representation
        when printing Int, Float, Double, Integer and Char. Of these, Integer
        was the most painful - we now have a dependency on integer-gmp due to
        needing access to the representation.
      
      * Fixed a bug in rts/Heap.c - it was bogusly returning stack content as
        pointers for an AP_STACK closure.
      
      Test Plan:
      * `cd testsuite/tests/ghci.debugger && make`
      * validate
      
      Reviewers: bgamari, patrickdoc, nomeata, angerman, hvr, erikd, goldfire
      
      Subscribers: alpmestan, snowleopard, rwbarton, thomie, carter
      
      GHC Trac Issues: #13184
      
      Differential Revision: https://phabricator.haskell.org/D4955
      3bdf0d01
  9. 15 Jul, 2018 2 commits
  10. 13 Jul, 2018 1 commit
    • Ömer Sinan Ağacan's avatar
      Fix processHeapClosureForDead CONSTR_NOCAF case · 2625f131
      Ömer Sinan Ağacan authored
      CONSTR_NOCAF was introduced with 55d535da as a replacement for
      CONSTR_STATIC and CONSTR_NOCAF_STATIC, however, as explained in Note
      [static constructors], we copy CONSTR_NOCAFs (which can also be seen in
      evacuate) during GC, and they can become dead, like other CONSTR_X_Ys.
      processHeapClosureForDead is updated to reflect this.
      
      Test Plan: Validates on x86_64. Existing failures on i386.
      
      Reviewers: simonmar, bgamari, erikd
      
      Reviewed By: simonmar, bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #7836, #15063, #15087, #15165
      
      Differential Revision: https://phabricator.haskell.org/D4928
      2625f131
  11. 12 Jul, 2018 1 commit
    • Simon Marlow's avatar
      Fix deadlock between STM and throwTo · 7fc418df
      Simon Marlow authored
      There was a lock-order reversal between lockTSO() and the TVar lock,
      see #15136 for the details.
      
      It turns out we can fix this pretty easily by just deleting all the
      locking code(!).  The principle for unblocking a `BlockedOnSTM` thread
      then becomes the same as for other kinds of blocking: if the TSO
      belongs to this capability then we do it directly, otherwise we send a
      message to the capability that owns the TSO. That is, a thread blocked
      on STM is owned by its capability, as it should be.
      
      The possible downside of this is that we might send multiple messages
      to wake up a thread when the thread is on another capability. This is
      safe, it's just not very efficient.  I'll try to do some experiments
      to see if this is a problem.
      
      Test Plan: Test case from #15136 doesn't deadlock any more.
      
      Reviewers: bgamari, osa1, erikd
      
      Reviewed By: osa1
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #15136
      
      Differential Revision: https://phabricator.haskell.org/D4956
      7fc418df
  12. 06 Jul, 2018 2 commits
    • Ben Gamari's avatar
      Revert "rts: Enable two-step allocator on FreeBSD" · 67153736
      Ben Gamari authored
      This reverts commit 87367158.
      
      I hadn't intended on merging this.
      67153736
    • Ben Gamari's avatar
      rts: Enable two-step allocator on FreeBSD · 87367158
      Ben Gamari authored
      Previously we would prevent any operating system not providing the
      MEM_NORESERVE flag
      from using the two-step allocator. Afterall, Linux will reserve
      swap-space for
      a mapping unless this flag is given, which is most certainly not what
      we want.
      
      However, it seems that FreeBSD provides the reservation-only mapping
      behavior
      that we expect despite not providing the MEM_NORESERVE macro. In fact,
      it
      provided the macro until 2014, when it was removed on account of not
      being
      implemented in the kernel. However, empirical evidence suggests that
      just plain
      mmap does what we want.
      
      Reviewers: erikd, simonmar
      
      Subscribers: rwbarton, thomie, erikd, carter
      
      GHC Trac Issues: #15348
      
      Differential Revision: https://phabricator.haskell.org/D4939
      87367158
  13. 04 Jul, 2018 1 commit
  14. 29 Jun, 2018 1 commit
  15. 28 Jun, 2018 1 commit
  16. 27 Jun, 2018 1 commit
  17. 26 Jun, 2018 1 commit
  18. 22 Jun, 2018 2 commits
  19. 20 Jun, 2018 2 commits
  20. 17 Jun, 2018 2 commits
  21. 16 Jun, 2018 2 commits
  22. 15 Jun, 2018 1 commit
  23. 14 Jun, 2018 4 commits
  24. 12 Jun, 2018 1 commit