Closed Bug 1458154 Opened 6 years ago Closed 6 years ago

Add a tunable for the idle time collection nursery threshold

Categories

(Core :: JavaScript: GC, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: pbone, Assigned: pbone)

References

Details

Attachments

(1 file)

Make Nursery::kIdleTimeCollectionThreshold a GC Scheduling tunable.
Assignee: nobody → pbone
Blocks: 1407143
Status: NEW → ASSIGNED
Priority: -- → P3
This is a patch I've split off from Bug 1407143 since it's now a bit more general.  I will then use it in that bug to tune nursery collection at the beginning of a slice.
Attachment #8972244 - Flags: review?(jcoppeard)
Comment on attachment 8972244 [details] [diff] [review]
Bug 1458154 - Add a tunable for idle nursery collection

Review of attachment 8972244 [details] [diff] [review]:
-----------------------------------------------------------------

Great, thanks for doing this.

::: js/src/gc/Nursery.cpp
@@ +679,5 @@
> +bool
> +js::Nursery::needIdleTimeCollection() const {
> +    uint32_t threshold =
> +        runtime()->gc.tunables.nurseryFreeThresholdForIdleCollection();
> +    return minorGCRequested() || (freeSpace() < threshold);

nit: parentheses unnecessary around the free space condition.

::: js/src/gc/Scheduling.h
@@ +435,5 @@
> +     * Attempt to run a minor GC in the idle time if the free space falls
> +     * below this threshold.
> +     */
> +    UnprotectedData<uint32_t> nurseryFreeThresholdForIdleCollection_;
> +  

nit: please remove trailing whitespace.
Attachment #8972244 - Flags: review?(jcoppeard) → review+
Pushed by pbone@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b9cbc054960
Add a tunable for idle nursery collection r=jonco
https://hg.mozilla.org/mozilla-central/rev/3b9cbc054960
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.