Bug 1288427 - Remove the base shapes update phase of compacting GC r=terrence
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 22 Jul 2016 13:57:10 +0100
changeset 331425 31163bfc3cb4f849c25c9f756bdfe3639b45b9fe
parent 331424 32050e8124afbca3b4bfc4fca30059abb9029229
child 331426 c9abfc5925a2af00d0eb3e61a6316efc7e83f9de
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1288427
milestone50.0a1
Bug 1288427 - Remove the base shapes update phase of compacting GC r=terrence
js/src/jsgc.cpp
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -2448,37 +2448,32 @@ GCRuntime::updateCellPointers(MovingTrac
 //
 // This is complicated by the fact that updating a GC thing sometimes depends on
 // making use of other GC things.  After a moving GC these things may not be in
 // a valid state since they may contain pointers which have not been updated
 // yet.
 //
 // The main dependencies are:
 //
-//   - Updating a shape makes use of its base shape
 //   - Updating a JSObject makes use of its shape
 //   - Updating a typed object makes use of its type descriptor object
 //
-// This means we require at least four phases for update:
+// This means we require at least three phases for update:
 //
-//  1) base shapes
-//  2) shapes
-//  3) typed object type descriptor objects
-//  4) all other objects
+//  1) shapes
+//  2) typed object type descriptor objects
+//  3) all other objects
 //
 // Since we want to minimize the number of phases, we put everything else into
-// the second phase and label it the 'misc' phase.
-
-static const AllocKinds UpdatePhaseBaseShapes {
-    AllocKind::BASE_SHAPE
-};
+// the first phase and label it the 'misc' phase.
 
 static const AllocKinds UpdatePhaseMisc {
     AllocKind::SCRIPT,
     AllocKind::LAZY_SCRIPT,
+    AllocKind::BASE_SHAPE,
     AllocKind::SHAPE,
     AllocKind::ACCESSOR_SHAPE,
     AllocKind::OBJECT_GROUP,
     AllocKind::STRING,
     AllocKind::JITCODE
 };
 
 static const AllocKinds UpdatePhaseObjects {
@@ -2500,18 +2495,16 @@ static const AllocKinds UpdatePhaseObjec
 
 void
 GCRuntime::updateAllCellPointers(MovingTracer* trc, Zone* zone)
 {
     AutoDisableProxyCheck noProxyCheck(rt); // These checks assert when run in parallel.
 
     size_t bgTaskCount = CellUpdateBackgroundTaskCount();
 
-    updateCellPointers(trc, zone, UpdatePhaseBaseShapes, bgTaskCount);
-
     updateCellPointers(trc, zone, UpdatePhaseMisc, bgTaskCount);
 
     // Update TypeDescrs before all other objects as typed objects access these
     // objects when we trace them.
     updateTypeDescrObjects(trc, zone);
 
     updateCellPointers(trc, zone, UpdatePhaseObjects, bgTaskCount);
 }