Thu Dec  3 07:07:28 PST 2009  Simon Marlow <[email protected]>
  * GC refactoring, remove "steps"
  Ignore-this: 5360b8bf30c6847ccb7ffa8c431e81ff
  
  The GC had a two-level structure, G generations each of T steps.
  Steps are for aging within a generation, mostly to avoid premature
  promotion.  
  
  Measurements show that more than 2 steps is almost never worthwhile,
  and 1 step is usually worse than 2.  In theory fractional steps are
  possible, so the ideal number of steps is somewhere between 1 and 3.
  GHC's default has always been 2.
  
  We can implement 2 steps quite straightforwardly by having each block
  point to the generation to which objects in that block should be
  promoted, so blocks in the nursery point to generation 0, and blocks
  in gen 0 point to gen 1, and so on.
  
  This commit removes the explicit step structures, merging generations
  with steps, thus simplifying a lot of code.  Performance is
  unaffected.  The tunable number of steps is now gone, although it may
  be replaced in the future by a way to tune the aging in generation 0.

    M ./includes/Cmm.h -1 +1
    M ./includes/mkDerivedConstants.c -2 +1
    M ./includes/rts/storage/Block.h -2 +2
    M ./includes/rts/storage/GC.h -39 +28
    M ./includes/stg/Regs.h -4 +4
    M ./rts/Arena.c -1 +1
    M ./rts/Printer.c -8 +6
    M ./rts/ProfHeap.c -12 +6
    M ./rts/Schedule.c -26 +26
    M ./rts/Stats.c -26 +20
    M ./rts/Threads.c -5 +5
    M ./rts/sm/BlockAlloc.c -2 +2
    M ./rts/sm/Compact.c -25 +19
    M ./rts/sm/Evac.c -83 +80
    M ./rts/sm/GC.c -344 +300
    M ./rts/sm/GCThread.h -22 +23
    M ./rts/sm/GCUtils.c -16 +16
    M ./rts/sm/GCUtils.h -4 +4
    M ./rts/sm/MarkWeak.c -30 +23
    M ./rts/sm/Sanity.c -40 +28
    M ./rts/sm/Sanity.h -1 +1
    M ./rts/sm/Scav.c -84 +79
    M ./rts/sm/Storage.c -185 +99
    M ./rts/sm/Storage.h -2 +2
    M ./rts/sm/Sweep.c -9 +9
    M ./rts/sm/Sweep.h -1 +1

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20091203150728-12142-85fc04b0df4f1a8284eb371d6154d9edf406a5ba.gz

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to