1. 04 Dec, 2007 1 commit
  2. 18 Oct, 2007 1 commit
  3. 11 Oct, 2007 1 commit
    • Simon Marlow's avatar
      Add a proper write barrier for MVars · 1ed01a87
      Simon Marlow authored
      Previously MVars were always on the mutable list of the old
      generation, which meant every MVar was visited during every minor GC.
      With lots of MVars hanging around, this gets expensive.  We addressed
      this problem for MUT_VARs (aka IORefs) a while ago, the solution is to
      use a traditional GC write-barrier when the object is modified.  This
      patch does the same thing for MVars.
      
      TVars are still done the old way, they could probably benefit from the
      same treatment too.
      1ed01a87
  4. 05 Sep, 2007 2 commits
  5. 04 Sep, 2007 1 commit
  6. 29 Aug, 2007 1 commit
  7. 20 Aug, 2007 1 commit
  8. 10 Aug, 2007 1 commit
  9. 06 Aug, 2007 1 commit
  10. 27 Jul, 2007 1 commit
    • Simon Marlow's avatar
      Pointer Tagging · 6015a94f
      Simon Marlow authored
        
      This patch implements pointer tagging as per our ICFP'07 paper "Faster
      laziness using dynamic pointer tagging".  It improves performance by
      10-15% for most workloads, including GHC itself.
      
      The original patches were by Alexey Rodriguez Yakushev
      <mrchebas@gmail.com>, with additions and improvements by me.  I've
      re-recorded the development as a single patch.
      
      The basic idea is this: we use the low 2 bits of a pointer to a heap
      object (3 bits on a 64-bit architecture) to encode some information
      about the object pointed to.  For a constructor, we encode the "tag"
      of the constructor (e.g. True vs. False), for a function closure its
      arity.  This enables some decisions to be made without dereferencing
      the pointer, which speeds up some common operations.  In particular it
      enables us to avoid costly indirect jumps in many cases.
      
      More information in the commentary:
      
      http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/PointerTagging
      6015a94f
  11. 03 Jul, 2007 1 commit
  12. 27 Jun, 2007 1 commit
  13. 26 Jun, 2007 1 commit
  14. 25 May, 2007 1 commit
  15. 03 May, 2007 1 commit
  16. 17 Apr, 2007 1 commit
    • Simon Marlow's avatar
      Re-working of the breakpoint support · cdce6477
      Simon Marlow authored
      This is the result of Bernie Pope's internship work at MSR Cambridge,
      with some subsequent improvements by me.  The main plan was to
      
       (a) Reduce the overhead for breakpoints, so we could enable 
           the feature by default without incurrent a significant penalty
       (b) Scatter more breakpoint sites throughout the code
      
      Currently we can set a breakpoint on almost any subexpression, and the
      overhead is around 1.5x slower than normal GHCi.  I hope to be able to
      get this down further and/or allow breakpoints to be turned off.
      
      This patch also fixes up :print following the recent changes to
      constructor info tables.  (most of the :print tests now pass)
      
      We now support single-stepping, which just enables all breakpoints.
      
        :step <expr>     executes <expr> with single-stepping turned on
        :step            single-steps from the current breakpoint
      
      The mechanism is quite different to the previous implementation.  We
      share code with the HPC (haskell program coverage) implementation now.
      The coverage pass annotates source code with "tick" locations which
      are tracked by the coverage tool.  In GHCi, each "tick" becomes a
      potential breakpoint location.
      
      Previously breakpoints were compiled into code that magically invoked
      a nested instance of GHCi.  Now, a breakpoint causes the current
      thread to block and control is returned to GHCi.
      
      See the wiki page for more details and the current ToDo list:
      
        http://hackage.haskell.org/trac/ghc/wiki/NewGhciDebugger
      cdce6477
  17. 16 Apr, 2007 1 commit
    • Simon Marlow's avatar
      MERGE: Fix a few uses of the wrong return convention for the scheduler · 94363dd5
      Simon Marlow authored
      We changed the convention a while ago so that BaseReg is returned to
      the scheduler in R1, because BaseReg may change during the run of a
      thread, e.g. during a foreign call.  A few places got missed,
      mostly for very rare events.
      
      Should fix concprog001, although I'm not able to reliably reproduce
      the failure.
      94363dd5
  18. 06 Mar, 2007 2 commits
  19. 28 Feb, 2007 1 commit
  20. 27 Feb, 2007 1 commit
  21. 09 Dec, 2006 1 commit
  22. 28 Nov, 2006 1 commit
  23. 24 Nov, 2006 1 commit
  24. 07 Oct, 2006 1 commit
  25. 05 Sep, 2006 1 commit
    • Ian Lynagh's avatar
      new RTS flag: -V to modify the resolution of the RTS timer · 93db1991
      Ian Lynagh authored
      Fixed version of an old patch by Simon Marlow. His description read:
       Also, now an arbitrarily short context switch interval may now be
       specified, as we increase the RTS ticker's resolution to match the
       requested context switch interval.  This also applies to +RTS -i (heap
       profiling) and +RTS -I (the idle GC timer).  +RTS -V is actually only
       required for increasing the resolution of the profile timer.
      93db1991
  26. 26 Jul, 2006 1 commit
  27. 29 Jun, 2006 2 commits
  28. 20 Jun, 2006 1 commit
  29. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
      0065d5ab
  30. 27 Mar, 2006 1 commit
    • Simon Marlow's avatar
      Add a new primitive forkOn#, for forking a thread on a specific Capability · c520a3a2
      Simon Marlow authored
      This gives some control over affinity, while we figure out the best
      way to automatically schedule threads to make best use of the
      available parallelism.
      
      In addition to the primitive, there is also:
       
        GHC.Conc.forkOnIO :: Int -> IO () -> IO ThreadId
      
      where 'forkOnIO i m' creates a thread on Capability (i `rem` N), where
      N is the number of available Capabilities set by +RTS -N.
      
      Threads forked by forkOnIO do not automatically migrate when there are
      free Capabilities, like normal threads do.  Still, if you're using
      forkOnIO exclusively, it's a good idea to do +RTS -qm to disable work
      pushing anyway (work pushing takes too much time when the run queues
      are large, this is something we need to fix).
      c520a3a2
  31. 28 Feb, 2006 3 commits
    • Simon Marlow's avatar
      takeMVar/putMVar were missing some write barriers when modifying a TSO · 080c9600
      Simon Marlow authored
      This relates to the recent introduction of clean/dirty TSOs, and the
      consqeuent write barriers required.  We were missing some write
      barriers in the takeMVar/putMVar family of primops, when performing
      the take/put directly on another TSO.
      
      Fixes #705, and probably some test failures.
      080c9600
    • Simon Marlow's avatar
      pass arguments to unknown function calls in registers · 04db0e9f
      Simon Marlow authored
      We now have more stg_ap entry points: stg_ap_*_fast, which take
      arguments in registers according to the platform calling convention.
      This is faster if the function being called is evaluated and has the
      right arity, which is the common case (see the eval/apply paper for
      measurements).  
      
      We still need the stg_ap_*_info entry points for stack-based
      application, such as an overflows when a function is applied to too
      many argumnets.  The stg_ap_*_fast functions actually just check for
      an evaluated function, and if they don't find one, push the args on
      the stack and invoke stg_ap_*_info.  (this might be slightly slower in
      some cases, but not the common case).
      04db0e9f
    • Simon Marlow's avatar
      fix live register annotations on foreign calls · 174c7f29
      Simon Marlow authored
      fix one incorrect case, and made several more accurate
      174c7f29
  32. 21 Feb, 2006 1 commit
    • Simon Marlow's avatar
      fix a deadlock in atomicModifyMutVar# · 25cc1d1f
      Simon Marlow authored
      atomicModifyMutVar# was re-using the storage manager mutex (sm_mutex)
      to get its atomicity guarantee in SMP mode. But recently the addition
      of a call to dirty_MUT_VAR() to implement the read barrier lead to a
      rare deadlock case, because dirty_MUT_VAR() very occasionally needs to
      allocate a new block to chain on the mutable list, which requires
      sm_mutex.
      25cc1d1f
  33. 10 Feb, 2006 1 commit
  34. 09 Feb, 2006 1 commit
  35. 07 Feb, 2006 1 commit