Last Comment Bug 711095 - make GC scanning compatible with the incremental GC
: make GC scanning compatible with the incremental GC
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla11
Assigned To: Igor Bukanov
:
Mentors:
Depends on: 708382
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-15 08:38 PST by Igor Bukanov
Modified: 2013-09-21 11:41 PDT (History)
11 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (12.29 KB, patch)
2011-12-15 08:40 PST, Igor Bukanov
wmccloskey: review+
Details | Diff | Review

Description Igor Bukanov 2011-12-15 08:38:36 PST
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.
Comment 1 Igor Bukanov 2011-12-15 08:40:27 PST
Created attachment 581985 [details] [diff] [review]
v1
Comment 2 Bill McCloskey (:billm) 2011-12-15 09:56:07 PST
Comment on attachment 581985 [details] [diff] [review]
v1

Thanks. This looks nice.
Comment 4 Ed Morley [:emorley] 2011-12-16 05:58:55 PST
https://hg.mozilla.org/mozilla-central/rev/5befa259ff16

Note You need to log in before you can comment on or make changes to this bug.