DescriptionFix the new generation growth criterion so it is not mislead into performing two growths in a row.
The decision to grow is based on the fraction of the objects that became garbage in the previous scavenge. If the previous scavenge included a growth, the new size of new space does not affect this statistic. If the program's allocation pattern remains the same, the next scavenge will see the same garbage ratio and decide to grow again, even if we would have hit the desired garbage fraction at the current capacity. This CL changes the garbage fraction to use the post-growth capcity as the dominator to prevent this eager double-growth.
This change causes Flutter Gallery to stablize at a 4MB semispace instead of 16MB, with ~10ms instead of ~40ms scavenges while interacting with the time picker on a Nexus 4.
R=danunez@google.com
Committed: https://github.com/dart-lang/sdk/commit/878a5f26537ec80a78a36707d46f54a2da4ab1ed
Patch Set 1 #
Total comments: 2
Patch Set 2 : speeling #
Messages
Total messages: 6 (2 generated)
|