1. 01 Jun, 2010 1 commit
  2. 29 May, 2010 4 commits
  3. 19 May, 2010 1 commit
  4. 28 Apr, 2010 1 commit
  5. 29 Mar, 2010 1 commit
    • Simon Marlow's avatar
      New implementation of BLACKHOLEs · 5d52d9b6
      Simon Marlow authored
      This replaces the global blackhole_queue with a clever scheme that
      enables us to queue up blocked threads on the closure that they are
      blocked on, while still avoiding atomic instructions in the common
       - gets rid of a locked global data structure and some tricky GC code
         (replacing it with some per-thread data structures and different
         tricky GC code :)
       - wakeups are more prompt: parallel/concurrent performance should
         benefit.  I haven't seen anything dramatic in the parallel
         benchmarks so far, but a couple of threading benchmarks do improve
         a bit.
       - waking up a thread blocked on a blackhole is now O(1) (e.g. if
         it is the target of throwTo).
       - less sharing and better separation of Capabilities: communication
         is done with messages, the data structures are strictly owned by a
         Capability and cannot be modified except by sending messages.
       - this change will utlimately enable us to do more intelligent
         scheduling when threads block on each other.  This is what started
         off the whole thing, but it isn't done yet (#3838).
      I'll be documenting all this on the wiki in due course.
  6. 30 Mar, 2010 1 commit
  7. 03 Apr, 2010 1 commit
  8. 22 Jan, 2010 2 commits
  9. 20 Jan, 2010 3 commits
  10. 16 Dec, 2009 1 commit
    • howard_b_golden@yahoo.com's avatar
      FIX #2615 (linker scripts in .so files) · e020e387
      howard_b_golden@yahoo.com authored
      This patch does not apply to Windows. It only applies to systems with
      ELF binaries.
      This is a patch to rts/Linker.c to recognize linker scripts in .so
      files and find the real target .so shared library for loading.
  11. 03 Dec, 2009 1 commit
  12. 02 Dec, 2009 1 commit
  13. 01 Dec, 2009 1 commit
    • Simon Marlow's avatar
      Make allocatePinned use local storage, and other refactorings · 5270423a
      Simon Marlow authored
      This is a batch of refactoring to remove some of the GC's global
      state, as we move towards CPU-local GC.  
        - allocateLocal() now allocates large objects into the local
          nursery, rather than taking a global lock and allocating
          then in gen 0 step 0.
        - allocatePinned() was still allocating from global storage and
          taking a lock each time, now it uses local storage. 
          (mallocForeignPtrBytes should be faster with -threaded).
        - We had a gen 0 step 0, distinct from the nurseries, which are
          stored in a separate nurseries[] array.  This is slightly strange.
          I removed the g0s0 global that pointed to gen 0 step 0, and
          removed all uses of it.  I think now we don't use gen 0 step 0 at
          all, except possibly when there is only one generation.  Possibly
          more tidying up is needed here.
        - I removed the global allocate() function, and renamed
          allocateLocal() to allocate().
        - the alloc_blocks global is gone.  MAYBE_GC() and
          doYouWantToGC() now check the local nursery only.
  14. 14 Nov, 2009 1 commit
  15. 11 Nov, 2009 3 commits
    • Simon Marlow's avatar
      Second attempt to fix #1185 (forkProcess and -threaded) · 2d5e052d
      Simon Marlow authored
      Patch 1/2: second part of the patch is to libraries/base
      This time without dynamic linker hacks, instead I've expanded the
      existing rts/Globals.c to cache more CAFs, specifically those in
      GHC.Conc.  We were already using this trick for signal handlers, I
      should have realised before.
      It's still quite unsavoury, but we can do away with rts/Globals.c in
      the future when we switch to a dynamically-linked GHCi.
    • Simon Marlow's avatar
      Support for DragonFly BSD · a35d65c3
      Simon Marlow authored
      Patches from Goetz Isenmann <info@goetz-isenmann.de>, slightly updated
      for HEAD (the method for configuring platforms in configure.ac has
    • chak@cse.unsw.edu.au.'s avatar
      Barf on unhandled Mach-O relocations in the ghci linker · 0b2de035
      chak@cse.unsw.edu.au. authored
      - It might be worthwhile to MERGE this to 6.12, BUT somebody should validate
        it on PPC/Mac OS X first.
  16. 06 Nov, 2009 1 commit
    • Simon Marlow's avatar
      Rollback #1185 fix · c3685050
      Simon Marlow authored
      As far as I can tell, the hack I was using in rts/Linker.c won't work
      on OS X.  Back to the drawing board.
      rolling back:
      Tue Nov  3 16:05:47 GMT 2009  Simon Marlow <marlowsd@gmail.com>
        * Fix #1185 (RTS part, also needs corresponding change to libraries/base)
        GHC.Conc.ensureIOManagerIsRunning now creates an IO manager thread if
        one does not exist or has died/exited.
        Unfortunately this exposed a problem caused by the fact that we have
        two base packages, and hence two IO managers, in GHCi: see NOTE
        [io-manager-ghci] in rts/Linker.c.  The workaround can go away if/when
        we switch to a dynamically linked GHCi.
          M ./rts/Linker.c -6 +47
          M ./rts/Schedule.c +4
          M ./rts/package.conf.in +16
          M ./rts/posix/Signals.c -1 +7
          M ./rts/posix/Signals.h +2
      Wed Nov  4 10:11:03 GMT 2009  Simon Marlow <marlowsd@gmail.com>
        * hopefully fix validate breakage on OS X and Windows
          M ./rts/Linker.c -1 +1
      Wed Nov  4 16:27:40 GMT 2009  Simon Marlow <marlowsd@gmail.com>
        * fix build failure on Windows
          M ./rts/Linker.c -1 +1
  17. 04 Nov, 2009 2 commits
  18. 03 Nov, 2009 1 commit
    • Simon Marlow's avatar
      Fix #1185 (RTS part, also needs corresponding change to libraries/base) · 3501ac6a
      Simon Marlow authored
      GHC.Conc.ensureIOManagerIsRunning now creates an IO manager thread if
      one does not exist or has died/exited.
      Unfortunately this exposed a problem caused by the fact that we have
      two base packages, and hence two IO managers, in GHCi: see NOTE
      [io-manager-ghci] in rts/Linker.c.  The workaround can go away if/when
      we switch to a dynamically linked GHCi.
  19. 29 Oct, 2009 1 commit
  20. 08 Oct, 2009 1 commit
  21. 25 Sep, 2009 1 commit
    • Simon Marlow's avatar
      Add a way to generate tracing events programmatically · 5407ad8e
      Simon Marlow authored
       primop  TraceEventOp "traceEvent#" GenPrimOp
         Addr# -> State# s -> State# s
         { Emits an event via the RTS tracing framework.  The contents
           of the event is the zero-terminated byte string passed as the first
           argument.  The event will be emitted either to the .eventlog file,
           or to stderr, depending on the runtime RTS flags. }
      and added the required RTS functionality to support it.  Also a bit of
      refactoring in the RTS tracing code.
  22. 23 Sep, 2009 1 commit
  23. 29 Aug, 2009 1 commit
  24. 23 Aug, 2009 1 commit
  25. 03 Aug, 2009 3 commits
  26. 02 Aug, 2009 1 commit
    • Simon Marlow's avatar
      RTS tidyup sweep, first phase · a2a67cd5
      Simon Marlow authored
      The first phase of this tidyup is focussed on the header files, and in
      particular making sure we are exposinng publicly exactly what we need
      to, and no more.
       - Rts.h now includes everything that the RTS exposes publicly,
         rather than a random subset of it.
       - Most of the public header files have moved into subdirectories, and
         many of them have been renamed.  But clients should not need to
         include any of the other headers directly, just #include the main
         public headers: Rts.h, HsFFI.h, RtsAPI.h.
       - All the headers needed for via-C compilation have moved into the
         stg subdirectory, which is self-contained.  Most of the headers for
         the rest of the RTS APIs have moved into the rts subdirectory.
       - I left MachDeps.h where it is, because it is so widely used in
         Haskell code.
       - I left a deprecated stub for RtsFlags.h in place.  The flag
         structures are now exposed by Rts.h.
       - Various internal APIs are no longer exposed by public header files.
       - Various bits of dead code and declarations have been removed
       - More gcc warnings are turned on, and the RTS code is more
       - More source files #include "PosixSource.h", and hence only use
         standard POSIX (1003.1c-1995) interfaces.
      There is a lot more tidying up still to do, this is just the first
      pass.  I also intend to standardise the names for external RTS APIs
      (e.g use the rts_ prefix consistently), and declare the internal APIs
      as hidden for shared libraries.
  27. 27 Jun, 2009 1 commit
  28. 22 Jun, 2009 1 commit
  29. 13 Jun, 2009 1 commit