Splay benchmark triggers lots of GC slices during the prepare phase
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
Details
Attachments
(2 files)
While testing other changes I noticed that we trigger a lot (~30) slices during the prepare phase of GC, while we're waiting for background unmarking to finish. We're triggering one for every arena allocated after we pass the initial threshold for triggering a GC.
These slices won't do anything so this is wasteful.
Conversely, there are extra checks in GCRuntime::checkHeapThreshold so we don't trigger slices when we're waiting for background finalization or decommit.
In both cases we should be able to set the slice threshold so that slices are only triggered for every MB of allocation. This would stop us triggering a slice per arena in the prepare phase and let us simplify the threshold check (at the cost of an empty GC slice every MB of allocation in this situation).
Assignee | ||
Comment 1•4 years ago
|
||
Zone start thresholds are only set when we start the collection itself, when the prepare phase has finished. It doesn't matter if we set slice thresholds independetly of these and it means that we can limit GC slices in the prepare phase to one per MB of allocation.
Assignee | ||
Comment 2•4 years ago
|
||
This removes the check that stops us alloc triggering slices when we're background sweeping or decommitting. Unless we've hit the incremental limit, such slices will exit without doing any work (as there's nothing to do but wait) and are pointless, but this allows us to simplify the threshold check logic. Slices like this are only trigger once per MB of data allocated so this extra execution is negligable.
Depends on D104665
Comment 4•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2e9ccb2af815
https://hg.mozilla.org/mozilla-central/rev/f6152e743c40
Description
•