Last Comment Bug 665781 - Do not shrink XML arrays during the GC
: Do not shrink XML arrays during the GC
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
-- normal (vote)
: ---
Assigned To: Igor Bukanov
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2011-06-20 15:57 PDT by Igor Bukanov
Modified: 2011-06-27 11:39 PDT (History)
21 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

v1 (1.50 KB, patch)
2011-06-20 16:08 PDT, Igor Bukanov
gal: review+
Details | Diff | Splinter Review

Description User image Igor Bukanov 2011-06-20 15:57:14 PDT
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.
Comment 1 User image Igor Bukanov 2011-06-20 16:08:23 PDT
Created attachment 540615 [details] [diff] [review]

Here is a trivial patch. Lets see if we have some tests that depends on xml shrinking during the GC.
Comment 2 User image Igor Bukanov 2011-06-21 13:07:34 PDT
Comment on attachment 540615 [details] [diff] [review]

The patch passed the try server.
Comment 3 User image Gregor Wagner [:gwagner] 2011-06-21 13:24:09 PDT
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?
Comment 5 User image Chris Leary [:cdleary] (not checking bugmail) 2011-06-27 11:38:53 PDT
cdleary-bot mozilla-central merge info:

Note You need to log in before you can comment on or make changes to this bug.