Closed Bug 1521562 Opened 2 years ago Closed 2 years ago

GC number gets incremented more than necessary

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

Currently GCRuntime::number is incremented in three places: incrementalSlice(), incMajorGcNumber() and incMinorGcNumber(). We need this to increase every slice and every minor GC because it's used to check whether some kind of GC has happened. But we don't need to increment it up to three times in a slice.

Patch to update this in minorGC(), and also in incrementalSlice() if we don't do a minor GC.

I feel like I should probably add a test for this too somehow...

Attachment #9038031 - Flags: review?(pbone)
Comment on attachment 9038031 [details] [diff] [review]
bug1521562-gc-number

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

LGTM,

Thanks for fixing the comment, I didn't know it was supposed to behave like this.
Attachment #9038031 - Flags: review?(pbone) → review+
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c8e4a4cd94fe
Only update GC slice number when necessary r=pbone
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.