Bug 1531540 - Don't specialise SubChunkLimit for mobile r=sfink
authorPaul Bone <pbone@mozilla.com>
Fri, 01 Mar 2019 17:53:38 +0000
changeset 520069 ab0fd75fd14200dc24e08d6c5b67e044c09bd59f
parent 520068 f9fb3fea307246f272cce497d34e818f060b5515
child 520070 deb832a494bb9930a617fb08629f6f07bade9dab
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1531540, 1530575
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1531540 - Don't specialise SubChunkLimit for mobile r=sfink This was specialised so that it wouldn't crash on mobile wouldn't crash when: SubChunkLimit + SubChunkStepstep > NurseryChunkUsableSize becase NurseryChunkUsableSize is smaller on mobile. However Bug 1530575 reduced the value of SubChunkStep so now we no-longer need to specialise SubChunkLimit. We never tested the impact of SubChunkLimit on mobile so it's just simpler to have one value. Differential Revision: https://phabricator.services.mozilla.com/D21645
js/src/gc/Nursery.h
--- a/js/src/gc/Nursery.h
+++ b/js/src/gc/Nursery.h
@@ -142,31 +142,21 @@ class Nursery {
   static const size_t ChunkShift = gc::ChunkShift;
 
   /*
    * SubChunkStep is the minimum amount to adjust the nursery's size by.
    */
   static const size_t SubChunkStep = gc::ArenaSize;
 
   /*
-   * SubChunkLimit is the lower limit of the nursery's capacity.
-   */
-#ifndef JS_GC_SMALL_CHUNK_SIZE
-  /*
    * 192K is conservative, not too low that root marking dominates.  The Limit
    * should be a multiple of the Step.
    */
   static const size_t SubChunkLimit = 192 * 1024;
-#else
-  /*
-   * With small chunk sizes (256K) we need to use smaller sub chunk limits and
-   * steps so that a full chunk minus one step is still larger than the limit.
-   */
-  static const size_t SubChunkLimit = 64 * 1024;
-#endif
+  static_assert(SubChunkLimit % SubChunkStep == 0, "The limit should be a multiple of the step");
 
   struct alignas(gc::CellAlignBytes) CellAlignedByte {
     char byte;
   };
 
   struct StringLayout {
     JS::Zone* zone;
     CellAlignedByte cell;