Do not shrink XML arrays during the GC

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Igor Bukanov, Assigned: Igor Bukanov)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Currently XMLArray stored in XML instances are shrunk during the GC to free unused capacity. This complicates the implementation of the parallel marking in bug 638660. As shrinking mutates the state this may require an extra locking during the marking depending on implementation details.

It would be nice to remove this code. If we get regression reports, we could change the code to do the shrinking when removing the XML elements in the same way as we manage the capacity of dense arrays.
(Assignee)

Comment 1

6 years ago
Created attachment 540615 [details] [diff] [review]
v1

Here is a trivial patch. Lets see if we have some tests that depends on xml shrinking during the GC.
(Assignee)

Comment 2

6 years ago
Comment on attachment 540615 [details] [diff] [review]
v1

The patch passed the try server.
Attachment #540615 - Flags: review?(anygregor)
I don't think I am the right person for the review here because I don't have any background information about this "trim" behavior. This patch makes an important improvement for the parallel marking patch and we should take it if there are no serious arguments against it. 

Brendan or Jason could you do the review?

Updated

6 years ago
Attachment #540615 - Flags: review?(anygregor) → review+
(Assignee)

Comment 4

6 years ago
http://hg.mozilla.org/tracemonkey/rev/0428dbdf3d58
Whiteboard: fixed-in-tracemonkey
cdleary-bot mozilla-central merge info:
http://hg.mozilla.org/mozilla-central/rev/0428dbdf3d58
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.