Skip to content
Snippets Groups Projects
  1. Feb 27, 2014
  2. Feb 20, 2014
  3. Feb 17, 2014
  4. Feb 07, 2014
  5. Feb 05, 2014
  6. Feb 04, 2014
  7. Jan 30, 2014
  8. Jan 28, 2014
    • awson's avatar
      25821cc9
    • Christiaan Baaij's avatar
      f7be53ac
    • Austin Seipp's avatar
      Refactor GCTDecl.h, and mitigate #7602 a bit · 28b031c5
      Austin Seipp authored
      
      This basically cleans a lot of GCTDecl up - I found it quite hard to
      read and a bit confusing. The changes are mostly cosmetic: better
      delineation between the alternative cases and light touchups, and tries
      to make every branch as consistent as possible.
      
      However, this patch does have one significant effect: it will ensure
      that any LLVM-based compilers will use __thread if they support it.
      Before, they would simply always use pthread_getspecific and
      pthread_setspecific, which are almost surely even *more* inefficient.
      
      The details are a bit too long and boring to go into here; see #7602.
      After talking with Simon, we decided to play it safe - __thread can at
      least be optimized by future clang releases even further on OS X if they
      choose, and it's safer until we can investigate the pthread
      implementation further on Mavericks.
      
      For Linux, the story isn't so bleak if you use Clang (for whatever
      reason) - Linux directly writes to `%fs` for __thread slots (while OS X
      will perform a load followed by an indirect call.) So it should still be
      fairly competitive, speed-wise.
      
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      28b031c5
  9. Jan 27, 2014
  10. Jan 16, 2014
    • Simon Marlow's avatar
      Add a way to reserve temporary stack space in high-level Cmm · eaa37a0f
      Simon Marlow authored
      We occasionally need to reserve some temporary memory in a primop for
      passing to a foreign function.  We've been using the stack for this,
      but when we moved to high-level Cmm it became quite fragile because
      primops are in high-level Cmm and the stack is supposed to be under
      the control of the Cmm pipeline.
      
      So this change puts things on a firmer footing by adding a new Cmm
      construct 'reserve'.  e.g. in decodeFloat_Int#:
      
          reserve 2 = tmp {
      
            mp_tmp1  = tmp + WDS(1);
            mp_tmp_w = tmp;
      
            /* Perform the operation */
            ccall __decodeFloat_Int(mp_tmp1 "ptr", mp_tmp_w "ptr", arg);
      
            r1 = W_[mp_tmp1];
            r2 = W_[mp_tmp_w];
          }
      
      reserve is described in CmmParse.y.
      
      Unfortunately the argument to reserve must be a compile-time constant.
      We might have to extend the parser to allow expressions with
      arithmetic operators if this is too restrictive.
      
      Note also that the return instruction for the procedure must be
      outside the scope of the reserved stack area, so we have to extract
      the values from the reserved area before we close the scope.  This
      means some more local variables (r1, r2 in the example above).  The
      generated code is more or less identical to what we had before though.
      eaa37a0f
  11. Jan 15, 2014
  12. Jan 11, 2014
  13. Jan 07, 2014
  14. Dec 31, 2013
  15. Dec 09, 2013
  16. Dec 05, 2013
  17. Dec 04, 2013
  18. Nov 30, 2013
  19. Nov 27, 2013
  20. Nov 22, 2013
  21. Nov 21, 2013
    • Simon Marlow's avatar
      Allow the linker to be used without retaining CAFs unconditionally · 5874f13f
      Simon Marlow authored
      This creates a new C API:
      
         initLinker_ (int retain_cafs)
      
      The old initLinker() was left as-is for backwards compatibility.  See
      documentation in Linker.h.
      5874f13f
    • Simon Marlow's avatar
      CheckUnload needs to look at revertible_caf_list · beaf8c37
      Simon Marlow authored
      Retained CAFs must keep an object file alive.
      beaf8c37
    • Simon Marlow's avatar
      In the DEBUG rts, track when CAFs are GC'd · e82fa829
      Simon Marlow authored
      This resurrects some old code and makes it work again.  The idea is
      that we want to get an error message if we ever enter a CAF that has
      been GC'd, rather than following its indirection which will likely
      cause a segfault.  Without this patch, these bugs are hard to track
      down in gdb, because the IND_STATIC code overwrites R1 (the pointer to
      the CAF) with its indirectee before jumping into bad memory, so we've
      lost the address of the CAF that got GC'd.
      
      Some associated refactoring while I was here.
      e82fa829
  22. Nov 14, 2013
    • Duncan Coutts's avatar
      Improve the shutdownHaskellAndSignal and add fast exit · a987b800
      Duncan Coutts authored
      This is the RTS part of a patch to base's topHandler to handle exiting
      by a signal.
      
      The intended behaviour is that on Unix, throwing ExitFailure (-sig)
      results in the process terminating with that signal. Previously
      shutdownHaskellAndSignal was only used for exiting with SIGINT due to
      the UserInterrupt exception.
      
      Improve shutdownHaskellAndSignal to do the signal part more carefully.
      In particular, it (should) now reliably terminates the process one way
      or another. Previusly if the signal was blocked, ignored or handled then
      shutdownHaskellAndSignal would actually return!
      
      Also, the topHandler code has two paths a careful shutdown and a "fast
      exit" where it does not give finalisers a chance to run. We want to
      support that mode also when we want to exit by signal. So rather than
      the base code directly calling stg_exit as it did before, we have a
      fastExit bool paramater for both shutdownHaskellAnd{Exit,Signal}.
      a987b800
    • Simon Marlow's avatar
      simplify processNurseryForDead · 5b0b83be
      Simon Marlow authored
      It wasn't actually broken, but it wasn't obviously right either.
      5b0b83be
    • Simon Marlow's avatar
      fix a small memory leak with +RTS -hb · 334545e0
      Simon Marlow authored
      334545e0
  23. Nov 02, 2013
Loading