Closed Bug 711095 Opened 8 years ago Closed 8 years ago

make GC scanning compatible with the incremental GC

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: igor, Assigned: igor)

References

Details

Attachments

(1 file)

This is a follow up for the bug 641025 comment 24.

The GC marking optimizations for the bug 708382 are not compatible with the incremental GC. As code pushes pointers into the slot array and, between incremental GC slices, the array can be relocated, it is not possible to restart marking for the object that owns the slot array.

This patch fixes that through pushing (obj, start, end) triples, not just (start, end) pairs. This way the incremental GC, when restarting the marking, can replaces all such triples on the stack with just obj restarting the scanning for the object.

This arrangement also allow to simplify the code. Currently, when pushing the array into the stack fails, the code has to delay scanning for all objects in the array. But with the owner object for the array available the delayed scanning can be triggered on the object itself. 

As this this simplification and related cleanup (like tail recursion elimination for dense array elements) make the marking code to run about 2-3% faster, I factor that into separated bug independent from incremental GC work.
No longer blocks: 706062
Attached patch v1Splinter Review
Assignee: general → igor
Attachment #581985 - Flags: review?(wmccloskey)
Comment on attachment 581985 [details] [diff] [review]
v1

Thanks. This looks nice.
Attachment #581985 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/5befa259ff16
Status: NEW → RESOLVED
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Closed: 8 years ago
https://hg.mozilla.org/mozilla-central/rev/5befa259ff16
Status: NEW → RESOLVED
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.