Nursery profiling information is wrong if the nursery is empty

RESOLVED FIXED in Firefox 54

Status

()

Core
JavaScript: GC
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jonco, Assigned: jonco)

Tracking

unspecified
mozilla54
Points:
---

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(1 attachment)

We don't currently clear profileDurations_ in Nursery::collect so if the nursery is empty and we skip calling doCollection we will report the durations for the previous collection.
This can be demonstrated by running:

$ JS_GC_PROFILE_NURSERY=0 ./shell -e 'a = []; for (let i = 0; i < 200000; i++) { a[i] = { x: i } } gc(); gc(); gc();'

The times given for e.g. marking the whole cell buffer are all the same for the last few collections.
Created attachment 8835582 [details] [diff] [review]
bug1338208-nursery-profile
Attachment #8835582 - Flags: review?(sphink)
Attachment #8835582 - Flags: review?(sphink) → review+

Comment 3

2 years ago
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/147e70a78d1a
Fix nursery profiling output if the nursery is empty r=sfink

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/147e70a78d1a
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.