Closed Bug 1549565 Opened 1 year ago Closed 1 year ago

Avoid firing unmark gray read barriers during iterations where no Cell pointers escape

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: sfink, Assigned: sfink)

Details

Attachments

(1 file)

I had a major slowdown with my weakmap marking patch stack that was causing everything to timeout when run within the browser (but not the shell), which ended up being because I had introduced an unwanted read barrier during transplanting (!). So after fixing that, I scanned through and found a bunch more places where we are unmarking gray on stuff that cannot escape to anywhere.

Initially, I did this by adding an unbarriered iterator invariant. It got messy because I was using the same set of constructors, which already forward Args... and have multiple variants, so I'd have to double those. It felt kind of gross, so I fell back on doing explicit .unbarrieredGet() when accessing the iterator. Arguably, this approach is prone to someone accidentally adding another access that will default to the barriered version. Anyway, I guess this is what reviews are for.

Note that this does not fix bug 1515934, which I haven't looked at yet.

Priority: -- → P3
Pushed by sfink@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/271c49dac12c
Avoid firing unmark gray read barriers during iterations where no Cell pointers escape. r=jonco
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

Noticed some perf improvements:

== Change summary for alert #20976 (as of Thu, 16 May 2019 23:56:28 GMT) ==

Improvements:

6% tp5o_webext responsiveness linux64-shippable-qr opt e10s stylo 1.99 -> 1.87
5% tp5o_webext responsiveness linux64-shippable opt e10s stylo 1.61 -> 1.53

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=20976

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