[GHC] #7751: Incremental heap census

#7751: Incremental heap census -----------------------------+---------------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.2 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- At the moment, a heap census forces a major garbage collection, because a heap census is always traverses the entire heap, and the only time when there is no slop is right after a major GC. What would be nice is if we only carried out heap census on portions of the heap which were *immediately* GC'd; i.e. an incremental census. The question, then, is how do we reconstruct full heap state from only a partial census? In particular, how do we know if an object that was previously present got collected or got promoted? If we always assume that it got collected (the naive implementation), a promoted object will disappear from the census, and only mysteriously reappear when we do a full census. The trick we want to employ is to save the starting pointer of all of the generations: while the entire generation is not slop free, the remainder of the first block and all of the later blocks are. I believe this is sufficient to reconstruct full heap state. #4225 has related discussion. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7751 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7751: Incremental heap census -----------------------------+---------------------------------------------- Reporter: ezyang | Owner: ezyang Type: feature request | Status: new Priority: normal | Component: Profiling Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Changes (by ezyang): * owner: => ezyang * type: bug => feature request * version: 7.6.2 => 7.7 * component: Compiler => Profiling -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7751#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7751: Incremental heap census -----------------------------+---------------------------------------------- Reporter: ezyang | Owner: ezyang Type: feature request | Status: new Priority: normal | Component: Profiling Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Comment(by ezyang): It appears to be a little more complicated than this: due to the fact that GHC will reuse todo blocks over minor collections, the first portion of a block will have slop, and the remainder of it will not. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7751#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7751: Incremental heap census -----------------------------+---------------------------------------------- Reporter: ezyang | Owner: ezyang Type: feature request | Status: new Priority: normal | Component: Profiling Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Comment(by ezyang): OK, so I have an implementation which adds a new field to block descriptors, "slopend", which records the division between sloppy / packed in the block. The trouble is, we don't actually have any space left in bdescr on 32-bit platforms... -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7751#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7751: Incremental heap census ---------------------------------+------------------------------------------ Reporter: ezyang | Owner: ezyang Type: feature request | Status: new Priority: normal | Milestone: 7.8.1 Component: Profiling | Version: 7.7 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by igloo): * difficulty: => Unknown * milestone: => 7.8.1 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7751#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC