[GHC] #10470: Allocating StablePtrs leads to GC slowdown even after they're freed
GHC
ghc-devs at haskell.org
Mon Jun 1 15:36:07 UTC 2015
#10470: Allocating StablePtrs leads to GC slowdown even after they're freed
-------------------------------------+-------------------------------------
Reporter: bitonic | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Description changed by bitonic:
Old description:
> If we allocate and then free a lot of StablePtrs the GC performance will
> be degrated for the rest of the execution.
>
> I have attached a program that performs a GC-heavy task (foldr'ing a long
> list of Ints) before and after allocating and then freeing a million
> StablePtrs. After the StablePtrs are freed the task takes more than
> twice as long.
>
> The reason for this is that {{stable_ptr_table}} in {{Stable.c}} is never
> resized, and is looped over for every GC pause.
New description:
If we allocate and then free a lot of StablePtrs the GC performance will
be degrated for the rest of the execution.
I have attached a program that performs a GC-heavy task (foldr'ing a long
list of Ints) before and after allocating and then freeing a million
StablePtrs. After the StablePtrs are freed the task takes more than twice
as long.
The reason for this is that `stable_ptr_table` in `Stable.c` is never
resized, and is looped over for every GC pause.
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10470#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list