Closed Bug 1549565 Opened 1 year ago Closed 1 year ago

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


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




Tracking Status
firefox68 --- fixed


(Reporter: sfink, Assigned: sfink)



(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
Avoid firing unmark gray read barriers during iterations where no Cell pointers escape. r=jonco
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) ==


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:

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