Closed Bug 1376101 Opened 8 years ago Closed 8 years ago

Remove some unnecessary read barriers

Categories

(Core :: JavaScript: GC, enhancement)

55 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(2 files)

We only need a read barrier for a weak pointer on operations where the pointer can escape. We don't need one for operations such as calculating the hash or matching an entry in a hash table. This came up in the context of sweeping hash tables off main thread. This patch removes a bunch of places this happens and lets us an assertion that read barriers only happen on the main thread.
Attachment #8881040 - Flags: review?(sphink)
Comment on attachment 8881040 [details] [diff] [review] remove-read-barrier Review of attachment 8881040 [details] [diff] [review]: ----------------------------------------------------------------- Oh, nice. I knew we had a bunch of these; I hadn't realized we were this close to being able to assert. ::: js/src/gc/Barrier.h @@ +587,5 @@ > this->post(JS::GCPolicy<T>::initial(), v); > } > > + // Copy is creates a new weak edge but the wrapped pointer does not escape, > + // so we no read barrier is necessary. 2 typos (grammaticos?) in the comment.
Attachment #8881040 - Flags: review?(sphink) → review+
(In reply to Steve Fink [:sfink] [:s:] from comment #1) > 2 typos (grammaticos?) in the comment. Ugh, sorry, will fix.
Keywords: leave-open
And another one.
Attachment #8881269 - Flags: review?(sphink)
Attachment #8881269 - Flags: review?(sphink) → review+
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4ece199e28df Remove some more unnecessary read barriers r=sfink
Keywords: leave-open
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: