Modified: trunk/Source/_javascript_Core/ChangeLog (220345 => 220346)
--- trunk/Source/_javascript_Core/ChangeLog 2017-08-07 18:25:13 UTC (rev 220345)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-08-07 18:42:34 UTC (rev 220346)
@@ -1,3 +1,19 @@
+2017-08-07 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r220144.
+ https://bugs.webkit.org/show_bug.cgi?id=175276
+
+ "It did not actually speed things up in the way I expected"
+ (Requested by saamyjoon on #webkit).
+
+ Reverted changeset:
+
+ "On memory-constrained iOS devices, reduce the rate at which
+ the JS heap grows before a GC to try to keep more memory
+ available for the system"
+ https://bugs.webkit.org/show_bug.cgi?id=175041
+ http://trac.webkit.org/changeset/220144
+
2017-08-07 Ryan Haddad <ryanhad...@apple.com>
Unreviewed, rolling out r220299.
Modified: trunk/Source/_javascript_Core/heap/Heap.cpp (220345 => 220346)
--- trunk/Source/_javascript_Core/heap/Heap.cpp 2017-08-07 18:25:13 UTC (rev 220345)
+++ trunk/Source/_javascript_Core/heap/Heap.cpp 2017-08-07 18:42:34 UTC (rev 220346)
@@ -71,7 +71,6 @@
#include <algorithm>
#if PLATFORM(IOS)
#include <bmalloc/bmalloc.h>
-#include <sys/sysctl.h>
#endif
#include <wtf/CurrentTime.h>
#include <wtf/ListDump.h>
@@ -117,39 +116,9 @@
return Options::smallHeapSize();
}
-#if PLATFORM(IOS)
-static bool useAggressiveGCTrigger()
-{
- static bool useAggressiveGCTrigger;
- static std::once_flag once;
- std::call_once(once, [] {
- useAggressiveGCTrigger = false;
-
- if (Options::forceAggressiveGCTrigger()) {
- useAggressiveGCTrigger = true;
- return;
- }
-
- uint64_t memSizeInBytes;
- size_t sizeofMemSize = sizeof(memSizeInBytes);
- if (sysctlbyname("hw.memsize", &memSizeInBytes, &sizeofMemSize, nullptr, 0))
- return;
- useAggressiveGCTrigger = memSizeInBytes <= 1 * GB;
- });
-
- return useAggressiveGCTrigger;
-}
-#endif
-
size_t proportionalHeapSize(size_t heapSize, size_t ramSize)
{
#if PLATFORM(IOS)
- if (useAggressiveGCTrigger()) {
- double memoryUsed = bmalloc::api::percentAvailableMemoryInUse();
- double result = ((1 - memoryUsed) / Options::aggressiveGCTriggerScalingValue()) + 1;
- return heapSize * std::max(std::min(result, Options::aggressiveGCTriggerMaxMultiplier()), Options::aggressiveGCTriggerMinMultiplier());
- }
-
size_t memoryFootprint = bmalloc::api::memoryFootprint();
if (memoryFootprint < ramSize * Options::smallHeapRAMFraction())
return Options::smallHeapGrowthFactor() * heapSize;
Modified: trunk/Source/_javascript_Core/runtime/Options.h (220345 => 220346)
--- trunk/Source/_javascript_Core/runtime/Options.h 2017-08-07 18:25:13 UTC (rev 220345)
+++ trunk/Source/_javascript_Core/runtime/Options.h 2017-08-07 18:42:34 UTC (rev 220346)
@@ -210,10 +210,6 @@
v(double, mediumHeapRAMFraction, 0.5, Normal, nullptr) \
v(double, mediumHeapGrowthFactor, 1.5, Normal, nullptr) \
v(double, largeHeapGrowthFactor, 1.24, Normal, nullptr) \
- v(bool, forceAggressiveGCTrigger, false, Normal, "If true, on iOS, we will use a different formula for proportionalHeapSize().") \
- v(double, aggressiveGCTriggerMinMultiplier, 1.07, Normal, "This is the minimum we must grow by for proportionalHeapSize() when doing aggressive triggering.") \
- v(double, aggressiveGCTriggerMaxMultiplier, 2.0, Normal, "This is the maximum we can grow by for proportionalHeapSize() when doing aggressive triggering.") \
- v(double, aggressiveGCTriggerScalingValue, 3.5, Normal, "This scales the above formula. A larger number is more aggressive in limiting heap growth. A smaller number is more permissive in allowing heap growth.") \
v(double, criticalGCMemoryThreshold, 0.80, Normal, "percent memory in use the GC considers critical. The collector is much more aggressive above this threshold") \
v(double, minimumMutatorUtilization, 0, Normal, nullptr) \
v(double, maximumMutatorUtilization, 0.7, Normal, nullptr) \