Backed out changeset 43baecd33ce6 (bug 1527225) for jsreftest at [@ js::Nursery::maybeResizeNursery(JS::GCReason)]. CLOSED TREE
authorBrindusan Cristian <cbrindusan@mozilla.com>
Thu, 14 Feb 2019 02:07:32 +0200
changeset 516854 c6829642e2d081d1a1be21b828a5eb7947eedc52
parent 516853 2ae0011bb82c88c2da0842dfda9c850a0f05b070
child 516873 f0ea53f47215d2449c7e759fa36aa76863ced3ff
child 516874 76b424f922cbf6c3827e01341ea5972bfaa58335
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)
bugs1527225
milestone67.0a1
backs out43baecd33ce64f6c09114f6463da2ceffb03bebe
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
Backed out changeset 43baecd33ce6 (bug 1527225) for jsreftest at [@ js::Nursery::maybeResizeNursery(JS::GCReason)]. CLOSED TREE
js/src/gc/Nursery.cpp
--- a/js/src/gc/Nursery.cpp
+++ b/js/src/gc/Nursery.cpp
@@ -1169,22 +1169,22 @@ void js::Nursery::maybeResizeNursery(JS:
 
   // If one of these conditions is true then we always shrink or grow the
   // nursery.  This way the thresholds still have an effect even if the goal
   // seeking says the current size is ideal.
   if (promotionRate > GrowThreshold) {
     unsigned lowLimit = maxChunkCount() + 1;
     unsigned highLimit = Min(chunkCountLimit(), maxChunkCount() * 2);
 
-    growAllocableSpace(mozilla::Clamp(newChunkCount, lowLimit, highLimit));
+    growAllocableSpace(Min(Max(newChunkCount, lowLimit), highLimit));
   } else if (maxChunkCount() > 1 && promotionRate < ShrinkThreshold) {
     unsigned lowLimit = Max(1u, maxChunkCount() / 2);
     unsigned highLimit = maxChunkCount() - 1u;
 
-    shrinkAllocableSpace(mozilla::Clamp(newChunkCount, lowLimit, highLimit));
+    shrinkAllocableSpace(Max(Min(newChunkCount, highLimit), lowLimit));
   }
 }
 
 void js::Nursery::growAllocableSpace(unsigned newCount) {
   MOZ_ASSERT(newCount >= currentChunk_);
   maxChunkCount_ = newCount;
 }