Closed
Bug 1376101
Opened 8 years ago
Closed 8 years ago
Remove some unnecessary read barriers
Categories
(Core :: JavaScript: GC, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(2 files)
6.22 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
984 bytes,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
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 1•8 years ago
|
||
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+
Assignee | ||
Comment 2•8 years ago
|
||
(In reply to Steve Fink [:sfink] [:s:] from comment #1)
> 2 typos (grammaticos?) in the comment.
Ugh, sorry, will fix.
Keywords: leave-open
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d53c5407081e
Remove some unnecessary read barriers r=sfink
Updated•8 years ago
|
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
Assignee | ||
Updated•8 years ago
|
Keywords: leave-open
Comment 6•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d53c5407081e
https://hg.mozilla.org/mozilla-central/rev/4ece199e28df
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•