[commit: ghc] master: Add a write barrier for TVAR closures (6d784c4)

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6d784c43592290ec16db8b7f0f2a012dff3ed497

>---------------------------------------------------------------

commit 6d784c43592290ec16db8b7f0f2a012dff3ed497
Author: Simon Marlow <[email protected]>
Date:   Fri Nov 16 09:22:00 2012 +0000

    Add a write barrier for TVAR closures
    
    This improves GC performance when there are a lot of TVars in the
    heap.  For instance, a TChan with a lot of elements causes a massive
    GC drag without this patch.
    
    There's more to do - several other STM closure types don't have write
    barriers, so GC performance when there are a lot of threads blocked on
    STM isn't great.  But fixing the problem for TVar is a good start.

 includes/rts/storage/ClosureTypes.h |   37 +++++++++---------
 includes/stg/MiscClosures.h         |    3 +-
 rts/ClosureFlags.c                  |    5 +-
 rts/Exception.cmm                   |    2 +-
 rts/LdvProfile.c                    |    1 +
 rts/Linker.c                        |    3 +
 rts/PrimOps.cmm                     |    2 +-
 rts/Printer.c                       |   14 +++++++
 rts/ProfHeap.c                      |    3 +-
 rts/RetainerProfile.c               |    5 ++-
 rts/STM.c                           |   63 ++++++++++++++++++------------
 rts/STM.h                           |    2 +-
 rts/Schedule.c                      |    2 +-
 rts/StgMiscClosures.cmm             |    7 ++-
 rts/sm/Compact.c                    |    1 +
 rts/sm/Evac.c                       |   12 ++---
 rts/sm/GC.c                         |   22 +++++++++-
 rts/sm/GC.h                         |    8 +++-
 rts/sm/Sanity.c                     |    1 +
 rts/sm/Scav.c                       |   73 +++++++++++++++++++++++++++++++++--
 rts/sm/Storage.c                    |    9 ++++
 rts/sm/Storage.h                    |    3 +-
 22 files changed, 209 insertions(+), 69 deletions(-)


Diff suppressed because of size. To see it, use:

    git show 6d784c43592290ec16db8b7f0f2a012dff3ed497
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.