Closed Bug 929546 Opened 11 years ago Closed 10 years ago

Rekey InitialShapeTable for moving metadata object pointer

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: sfink, Assigned: jonco)

References

Details

(Whiteboard: [qa-])

Attachments

(2 files)

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
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+
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+
https://hg.mozilla.org/mozilla-central/rev/34a1652e8f52
https://hg.mozilla.org/mozilla-central/rev/224f3b70841f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: