[GHC] #7670: StablePtrs should be organized by generation for efficient minor collections

GHC cvs-ghc at haskell.org
Thu Feb 7 11:21:43 CET 2013


#7670: StablePtrs should be organized by generation for efficient minor
collections
---------------------------------+------------------------------------------
    Reporter:  ezyang            |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Runtime System    |     Version:  7.7             
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by simonmar):

  * difficulty:  => Unknown


Comment:

 Right, we could do `StablePtr`s like mutable lists: keep them in a chain
 of blocks hanging off each generation.  If parallel performance for
 creating `StablePtr`s is important you might even want to have per-
 Capability lists (it's not that hard, actually).

 During a GC:

  * traverse the stable ptr lists for each generation we are collecting
 (only)
  * evacuate the object
  * place the pointer into the stable ptr list for the generation that the
 object is now in
    (found by `Bdescr(p)->gen_no`)

 That is, for generations we collect, we throw away the old stable ptr
 lists and create new ones. (this is just like the mutable lists).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7670#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list