[GHC] #7670: StablePtrs should be organized by generation for efficient minor collections
GHC
ghc-devs at haskell.org
Thu Aug 23 17:52:51 UTC 2018
#7670: StablePtrs should be organized by generation for efficient minor
collections
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonmar):
I can't off-hand think of a reason why no-stable-name-table wouldn't work.
Seems reasonable to me.
A per-generation hash table is tricky because each entry is associated
with two heap objects: the key and the `StableName` object, which may be
in different generations. The hash table is keyed by the key (we really
need a different name for that), so obviously it's the `StableName` object
that might reside in a different generation. You would probably need
something like a remembered set, to remember which hash table entries
point to a StableName in a younger generation and therefore might need
updating during a young-gen collection. I'm sure that's not the only
design though.
It's worth considering that you could do no-stable-name-table without per-
generation hash tables, as an intermediate step.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7670#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list