Closed
Bug 831886
Opened 11 years ago
Closed 11 years ago
[meta] Reduce performance cost of exact stack rooting
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bhackett1024, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: meta)
Attachments
(2 files)
5.67 KB,
text/plain
|
Details | |
2.55 KB,
patch
|
Details | Diff | Splinter Review |
Enabling exact rooting currently slows down SS for me by 2.7% (linux/x64). It would be good to reduce this to <1% or so, by refactoring and restructuring the code to reduce the number of roots required on hot paths.
Reporter | ||
Updated•11 years ago
|
Blocks: GenerationalGC
Reporter | ||
Comment 1•11 years ago
|
||
Looking at sites where roots are created in SS points to a concentration in interpreter and object operations (as opposed to a more diffuse spread). Out of 3.7 million roots created in a single run of the suite with 501 different callers creating roots, 69% of the roots are accounted for by the top 20 callers, and 90% by the top 60 callers. Almost all of these roots can be removed. Some are unnecessary given bug 772820, and most of the rest can be fixed by refactoring code so that there is a fallible path that is tried first and gives up if a GC or VM reentry is needed, plus a slower path that does full rooting and can handle all inputs. I believe the latter strategy is similar to what v8 does. Attached is the list of names, individual and cumulative hits for the top 60 functions which construct roots.
Reporter | ||
Updated•11 years ago
|
Attachment #703521 -
Attachment is patch: false
Reporter | ||
Comment 2•11 years ago
|
||
Patch with instrumentation for counting constructed roots for each caller.
Reporter | ||
Comment 3•11 years ago
|
||
With the various dependent bugs fixed, I now get a performance difference of <1ms on SS, or .4% when enabling exact rooting (linux/x64). The number of constructed roots has been reduced to 22% of the original total, or 810k. While there is always more that could be done here, this I think leaves us in pretty good shape as the roots fixed by the dependent bugs should help on most any workload rather than being SS specific.
Comment 4•11 years ago
|
||
Is Bug 791022 relevant here, too?
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•