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 459073 c6829642e2d0
parent 459072 2ae0011bb82c
child 459074 f0ea53f47215
child 459192 76b424f922cb
push id111913
push usershindli@mozilla.com
push dateThu, 14 Feb 2019 05:01:59 +0000
treeherdermozilla-inbound@a0752d7e8073 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1527225
milestone67.0a1
backs out43baecd33ce6
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;
 }