Rekey InitialShapeTable for moving metadata object pointer

RESOLVED FIXED in mozilla29

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: sfink, Assigned: jonco)

Tracking

unspecified
mozilla29
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(2 attachments)

Bug 929151 disables ggc whenever the metadata hook is set. If this feature ends up getting used, it would be much better to leave ggc enabled and rekey instead.
Blocks: 885550
(Assignee)

Comment 1

4 years ago
Created attachment 8355554 [details] [diff] [review]
bug929546-rekey-initial-shape-table

Rather than iterating through all the initial shape tables per bug 953188, here's a patch which adds a storebuffer entry to rekey the entries if necessary.

From running our tests I found that any of the proto, metadata and parent pointers can be in the nursery.
Assignee: nobody → jcoppeard
Attachment #8355554 - Flags: review?(terrence)
Comment on attachment 8355554 [details] [diff] [review]
bug929546-rekey-initial-shape-table

Review of attachment 8355554 [details] [diff] [review]:
-----------------------------------------------------------------

Great work! That's much better than the hack I had in mind. r=me

::: js/src/vm/Shape.h
@@ +1463,5 @@
>          {}
> +
> +#ifdef JSGC_GENERATIONAL
> +        /*
> +         * For use by generational GC post barriers.  Look up an entry whose

One space between sentences.
Attachment #8355554 - Flags: review?(terrence) → review+
(Assignee)

Updated

4 years ago
Duplicate of this bug: 953188
(Assignee)

Comment 4

4 years ago
Created attachment 8355856 [details] [diff] [review]
bug929546-dont-mark-initial-shapes

I always fall foul of the single space rule :)

Looking at the code again I discovered that we already mark all initial shape table entries on minor GC.  With the patch above, we can remove this.
Attachment #8355856 - Flags: review?(terrence)
(In reply to Jon Coppeard (:jonco) from comment #4)
> Created attachment 8355856 [details] [diff] [review]
> bug929546-dont-mark-initial-shapes
> 
> I always fall foul of the single space rule :)
> 
> Looking at the code again I discovered that we already mark all initial
> shape table entries on minor GC.  With the patch above, we can remove this.

Makes sense; I thought it was pretty odd that we weren't hitting this all the time.
Comment on attachment 8355856 [details] [diff] [review]
bug929546-dont-mark-initial-shapes

Review of attachment 8355856 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #8355856 - Flags: review?(terrence) → review+

Comment 8

4 years ago
https://hg.mozilla.org/mozilla-central/rev/34a1652e8f52
https://hg.mozilla.org/mozilla-central/rev/224f3b70841f
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
(Assignee)

Updated

4 years ago
Duplicate of this bug: 957107

Updated

4 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.