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

RESOLVED FIXED in Firefox 68

Status

()

defect
P3
normal
RESOLVED FIXED
2 months ago
Last month

People

(Reporter: sfink, Assigned: sfink)

Tracking

unspecified
mozilla68
Points:
---

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

2 months ago

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

Comment 2

Last month
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

Comment 3

Last month
bugherder
Status: ASSIGNED → RESOLVED
Closed: Last month
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.