Title: [210532] trunk/Source
Revision
210532
Author
[email protected]
Date
2017-01-09 16:46:04 -0800 (Mon, 09 Jan 2017)

Log Message

[iOS] Drop VNodeTracker
https://bugs.webkit.org/show_bug.cgi?id=166868
<rdar://problem/29937587>

Reviewed by Andreas Kling.

Source/WebCore:

Drop VNodeTracker on iOS. This was introduced a while back to try and
address vnode exhaustion issues in long running page load tests.
However, there was no evidence that the VNodeTracker functionality
helped so there is little point in keeping the extra code complexity.

* WebCore.xcodeproj/project.pbxproj:
* platform/SharedBuffer.h:
* platform/VNodeTracker.cpp: Removed.
* platform/VNodeTracker.h: Removed.
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::SharedBuffer):
* platform/cocoa/VNodeTrackerCocoa.cpp: Removed.

Source/WebKit2:

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (210531 => 210532)


--- trunk/Source/WebCore/ChangeLog	2017-01-10 00:32:24 UTC (rev 210531)
+++ trunk/Source/WebCore/ChangeLog	2017-01-10 00:46:04 UTC (rev 210532)
@@ -1,3 +1,24 @@
+2017-01-09  Chris Dumez  <[email protected]>
+
+        [iOS] Drop VNodeTracker
+        https://bugs.webkit.org/show_bug.cgi?id=166868
+        <rdar://problem/29937587>
+
+        Reviewed by Andreas Kling.
+
+        Drop VNodeTracker on iOS. This was introduced a while back to try and
+        address vnode exhaustion issues in long running page load tests.
+        However, there was no evidence that the VNodeTracker functionality
+        helped so there is little point in keeping the extra code complexity.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/SharedBuffer.h:
+        * platform/VNodeTracker.cpp: Removed.
+        * platform/VNodeTracker.h: Removed.
+        * platform/cf/SharedBufferCF.cpp:
+        (WebCore::SharedBuffer::SharedBuffer):
+        * platform/cocoa/VNodeTrackerCocoa.cpp: Removed.
+
 2017-01-09  Brent Fulgham  <[email protected]>
 
         File scheme should not allow access of a resource on a different volume.

Modified: trunk/Source/WebCore/PlatformMac.cmake (210531 => 210532)


--- trunk/Source/WebCore/PlatformMac.cmake	2017-01-10 00:32:24 UTC (rev 210531)
+++ trunk/Source/WebCore/PlatformMac.cmake	2017-01-10 00:46:04 UTC (rev 210532)
@@ -288,7 +288,6 @@
     platform/LocalizedStrings.cpp
     platform/RuntimeApplicationChecks.mm
     platform/ScrollableArea.cpp
-    platform/VNodeTracker.cpp
 
     platform/audio/AudioSession.cpp
 
@@ -331,7 +330,6 @@
     platform/cocoa/SystemVersion.mm
     platform/cocoa/TelephoneNumberDetectorCocoa.cpp
     platform/cocoa/ThemeCocoa.mm
-    platform/cocoa/VNodeTrackerCocoa.cpp
     platform/cocoa/WebCoreNSErrorExtras.mm
 
     platform/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp

Modified: trunk/Source/WebCore/PlatformWin.cmake (210531 => 210532)


--- trunk/Source/WebCore/PlatformWin.cmake	2017-01-10 00:32:24 UTC (rev 210531)
+++ trunk/Source/WebCore/PlatformWin.cmake	2017-01-10 00:46:04 UTC (rev 210532)
@@ -61,7 +61,6 @@
     platform/KillRingNone.cpp
     platform/LocalizedStrings.cpp
     platform/StaticPasteboard.cpp
-    platform/VNodeTracker.cpp
 
     platform/audio/PlatformMediaSessionManager.cpp
 

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (210531 => 210532)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-01-10 00:32:24 UTC (rev 210531)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-01-10 00:46:04 UTC (rev 210532)
@@ -1746,14 +1746,11 @@
 		46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		46C83EFD1A9BBE2900A79A41 /* GeoNotifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */; };
 		46C83EFE1A9BBE2900A79A41 /* GeoNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		46DB7D571B20FE46005651B2 /* VNodeTrackerCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */; };
 		46DBB6501AB8C96F00D9A813 /* PowerObserverMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */; };
 		46DFF4981DC2603100B80B48 /* ShadowRootMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DFF4961DC2601300B80B48 /* ShadowRootMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		46DFF49B1DC2620B00B80B48 /* JSShadowRootMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DFF4991DC261F900B80B48 /* JSShadowRootMode.cpp */; };
 		46DFF49C1DC2620B00B80B48 /* JSShadowRootMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DFF49A1DC261F900B80B48 /* JSShadowRootMode.h */; };
 		46EBEA021B7D4D6500BE4941 /* CollectionTraversal.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EBEA011B7D4D5D00BE4941 /* CollectionTraversal.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		46F3E3F91B2109000087ED13 /* VNodeTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DB7D581B20FE58005651B2 /* VNodeTracker.cpp */; };
-		46F3E3FA1B2109100087ED13 /* VNodeTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DB7D591B20FE58005651B2 /* VNodeTracker.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		46FCB6181A70820E00C5A21E /* DiagnosticLoggingKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = CD37B37515C1A7E1006DC898 /* DiagnosticLoggingKeys.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		490707E61219C04300D90E51 /* ANGLEWebKitBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */; };
 		490707E71219C04300D90E51 /* ANGLEWebKitBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */; };
@@ -8939,9 +8936,6 @@
 		46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEventTargetCustom.h; sourceTree = "<group>"; };
 		46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeoNotifier.cpp; sourceTree = "<group>"; };
 		46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeoNotifier.h; sourceTree = "<group>"; };
-		46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VNodeTrackerCocoa.cpp; sourceTree = "<group>"; };
-		46DB7D581B20FE58005651B2 /* VNodeTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VNodeTracker.cpp; sourceTree = "<group>"; };
-		46DB7D591B20FE58005651B2 /* VNodeTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VNodeTracker.h; sourceTree = "<group>"; };
 		46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PowerObserverMac.h; sourceTree = "<group>"; };
 		46DFF4961DC2601300B80B48 /* ShadowRootMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShadowRootMode.h; sourceTree = "<group>"; };
 		46DFF4971DC2601300B80B48 /* ShadowRootMode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ShadowRootMode.idl; sourceTree = "<group>"; };
@@ -19798,7 +19792,6 @@
 				7CC564B918BAC720001B9652 /* TelephoneNumberDetectorCocoa.cpp */,
 				310D71941B335C9D009C7B73 /* ThemeCocoa.h */,
 				310D71931B335C9D009C7B73 /* ThemeCocoa.mm */,
-				46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */,
 				CDC979F31C498C0900DB50D4 /* WebCoreNSErrorExtras.h */,
 				CDC979F21C498C0900DB50D4 /* WebCoreNSErrorExtras.mm */,
 				5DFEBAB618592B6D00C75BEB /* WebKitAvailability.h */,
@@ -22671,8 +22664,6 @@
 				2E3BBF061162DA1100B9409A /* UUID.h */,
 				83C45B8D1DC2B67C008871BA /* ValidationBubble.h */,
 				9A1142031832D134000BB8AD /* ValueToString.h */,
-				46DB7D581B20FE58005651B2 /* VNodeTracker.cpp */,
-				46DB7D591B20FE58005651B2 /* VNodeTracker.h */,
 				515F79511CFCA3C700CCED93 /* WebCoreCrossThreadCopier.cpp */,
 				515F79521CFCA3C700CCED93 /* WebCoreCrossThreadCopier.h */,
 				9380F47109A11AB4001FDB34 /* Widget.cpp */,
@@ -28184,7 +28175,6 @@
 				93309E1E099E64920056E581 /* VisibleUnits.h in Headers */,
 				419BC2DF1685329900D64D6D /* VisitedLinkState.h in Headers */,
 				1ABA80001897341200DCE9D6 /* VisitedLinkStore.h in Headers */,
-				46F3E3FA1B2109100087ED13 /* VNodeTracker.h in Headers */,
 				E44613B60CD6344E00FADA75 /* VoidCallback.h in Headers */,
 				BE20507A18A4586B0080647E /* VTTCue.h in Headers */,
 				7AF9B20318CFB2DF00C64BEF /* VTTRegion.h in Headers */,
@@ -31682,8 +31672,6 @@
 				93309E1D099E64920056E581 /* VisibleUnits.cpp in Sources */,
 				419BC2DE1685329900D64D6D /* VisitedLinkState.cpp in Sources */,
 				1AF4CEEC18BC3C1B00BC2D34 /* VisitedLinkStore.cpp in Sources */,
-				46F3E3F91B2109000087ED13 /* VNodeTracker.cpp in Sources */,
-				46DB7D571B20FE46005651B2 /* VNodeTrackerCocoa.cpp in Sources */,
 				BE20507918A458680080647E /* VTTCue.cpp in Sources */,
 				7AF9B20218CFB2DF00C64BEF /* VTTRegion.cpp in Sources */,
 				7AF9B20518CFB2DF00C64BEF /* VTTRegionList.cpp in Sources */,

Modified: trunk/Source/WebCore/platform/SharedBuffer.h (210531 => 210532)


--- trunk/Source/WebCore/platform/SharedBuffer.h	2017-01-10 00:32:24 UTC (rev 210531)
+++ trunk/Source/WebCore/platform/SharedBuffer.h	2017-01-10 00:46:04 UTC (rev 210532)
@@ -35,7 +35,6 @@
 #include <wtf/text/WTFString.h>
 
 #if USE(CF)
-#include "VNodeTracker.h"
 #include <wtf/RetainPtr.h>
 #endif
 
@@ -172,7 +171,6 @@
 #if USE(CF)
     explicit SharedBuffer(CFDataRef);
     RetainPtr<CFDataRef> m_cfData;
-    VNodeTracker::Token m_vnodeToken;
 #endif
 
 #if USE(SOUP)

Deleted: trunk/Source/WebCore/platform/VNodeTracker.cpp (210531 => 210532)


--- trunk/Source/WebCore/platform/VNodeTracker.cpp	2017-01-10 00:32:24 UTC (rev 210531)
+++ trunk/Source/WebCore/platform/VNodeTracker.cpp	2017-01-10 00:46:04 UTC (rev 210532)
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "VNodeTracker.h"
-
-#include "Logging.h"
-#include <wtf/NeverDestroyed.h>
-
-namespace WebCore {
-
-VNodeTracker& VNodeTracker::singleton()
-{
-    static NeverDestroyed<VNodeTracker> vnodeTracker;
-    return vnodeTracker;
-}
-
-VNodeTracker::VNodeTracker()
-    : m_vnodeCounter([this](RefCounterEvent event) { if (event == RefCounterEvent::Increment) checkPressureState(); })
-    , m_pressureWarningTimer(*this, &VNodeTracker::pressureWarningTimerFired)
-    , m_lastWarningTime(std::chrono::steady_clock::now())
-{
-    platformInitialize();
-
-    LOG(MemoryPressure, "Using following vnode limits for this process: soft=%u, hard=%u", m_softVNodeLimit, m_hardVNodeLimit);
-}
-
-void VNodeTracker::checkPressureState()
-{
-    ASSERT(m_pressureHandler);
-
-    if (m_vnodeCounter.value() <= m_softVNodeLimit)
-        return;
-
-    if (!m_pressureWarningTimer.isActive())
-        m_pressureWarningTimer.startOneShot(nextPressureWarningInterval());
-}
-
-void VNodeTracker::pressureWarningTimerFired()
-{
-    if (m_vnodeCounter.value() <= m_softVNodeLimit)
-        return;
-
-    m_lastWarningTime = std::chrono::steady_clock::now();
-    unsigned vnodeCount = m_vnodeCounter.value();
-    auto critical = vnodeCount > m_hardVNodeLimit ? Critical::Yes : Critical::No;
-    m_pressureHandler(critical);
-    LOG(MemoryPressure, "vnode pressure handler freed %lu vnodes out of %u (critical pressure: %s)", vnodeCount - m_vnodeCounter.value(), vnodeCount, critical == Critical::Yes ? "Yes" : "No");
-}
-
-std::chrono::milliseconds VNodeTracker::nextPressureWarningInterval() const
-{
-    // We run the vnode pressure handler every 30 seconds at most.
-    static const auto minimumWarningInterval = std::chrono::seconds { 30 };
-    auto timeSinceLastWarning = std::chrono::steady_clock::now() - m_lastWarningTime;
-    if (timeSinceLastWarning < minimumWarningInterval)
-        return std::chrono::duration_cast<std::chrono::milliseconds>(minimumWarningInterval - timeSinceLastWarning);
-    return std::chrono::milliseconds { 0 };
-}
-
-#if !PLATFORM(COCOA)
-
-void VNodeTracker::platformInitialize()
-{
-}
-
-#endif
-
-} // namespace WebCore

Deleted: trunk/Source/WebCore/platform/VNodeTracker.h (210531 => 210532)


--- trunk/Source/WebCore/platform/VNodeTracker.h	2017-01-10 00:32:24 UTC (rev 210531)
+++ trunk/Source/WebCore/platform/VNodeTracker.h	2017-01-10 00:46:04 UTC (rev 210532)
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef VNodeTracker_h
-#define VNodeTracker_h
-
-#include "MemoryPressureHandler.h"
-#include "Timer.h"
-#include <chrono>
-#include <wtf/Forward.h>
-#include <wtf/RefCounter.h>
-
-namespace WebCore {
-
-class VNodeTracker {
-    friend class WTF::NeverDestroyed<VNodeTracker>;
-public:
-    using PressureHandler = std::function<void(Critical)>;
-
-    enum VNodeCounterType { };
-    using VNodeCounter = RefCounter<VNodeCounterType>;
-    using Token = VNodeCounter::Token;
-
-    WEBCORE_EXPORT static VNodeTracker& singleton();
-
-    void setPressureHandler(PressureHandler);
-    Token token();
-
-private:
-    VNodeTracker();
-
-    void checkPressureState();
-    void pressureWarningTimerFired();
-    std::chrono::milliseconds nextPressureWarningInterval() const;
-
-    void platformInitialize();
-
-    unsigned m_hardVNodeLimit { 400 };
-    unsigned m_softVNodeLimit { 300 };
-    PressureHandler m_pressureHandler;
-    VNodeCounter m_vnodeCounter;
-    Timer m_pressureWarningTimer;
-    std::chrono::steady_clock::time_point m_lastWarningTime;
-};
-
-inline void VNodeTracker::setPressureHandler(PressureHandler handler)
-{
-    m_pressureHandler = handler;
-}
-
-inline auto VNodeTracker::token() -> Token
-{
-    return m_pressureHandler ? m_vnodeCounter.count() : Token();
-}
-
-} // namespace WebCore
-
-#endif // VNodeTracker_h

Modified: trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp (210531 => 210532)


--- trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp	2017-01-10 00:32:24 UTC (rev 210531)
+++ trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp	2017-01-10 00:46:04 UTC (rev 210532)
@@ -36,7 +36,6 @@
 SharedBuffer::SharedBuffer(CFDataRef cfData)
     : m_buffer(adoptRef(*new DataBuffer))
     , m_cfData(cfData)
-    , m_vnodeToken(VNodeTracker::singleton().token())
 {
 }
 

Deleted: trunk/Source/WebCore/platform/cocoa/VNodeTrackerCocoa.cpp (210531 => 210532)


--- trunk/Source/WebCore/platform/cocoa/VNodeTrackerCocoa.cpp	2017-01-10 00:32:24 UTC (rev 210531)
+++ trunk/Source/WebCore/platform/cocoa/VNodeTrackerCocoa.cpp	2017-01-10 00:46:04 UTC (rev 210532)
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "VNodeTracker.h"
-
-#include "Logging.h"
-#include <algorithm>
-#include <sys/sysctl.h>
-#include <sys/types.h>
-
-namespace WebCore {
-
-void VNodeTracker::platformInitialize()
-{
-    unsigned systemMaxVNodes = 0;
-    size_t len = sizeof(systemMaxVNodes);
-
-    // Query the maximum number of vnodes on the system and use 15% of that value as soft limit for this process,
-    // and 20% of that value as hard limit.
-    if (sysctlbyname("kern.maxvnodes", &systemMaxVNodes, &len, nullptr, 0))
-        return;
-
-    LOG(MemoryPressure, "System vnode limit is %u", systemMaxVNodes);
-
-    m_softVNodeLimit = std::max(m_softVNodeLimit, static_cast<unsigned>(systemMaxVNodes * 0.15));
-    m_hardVNodeLimit = std::max(m_hardVNodeLimit, static_cast<unsigned>(systemMaxVNodes * 0.2));
-}
-
-} // namespace WebCore

Modified: trunk/Source/WebKit2/ChangeLog (210531 => 210532)


--- trunk/Source/WebKit2/ChangeLog	2017-01-10 00:32:24 UTC (rev 210531)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-10 00:46:04 UTC (rev 210532)
@@ -1,3 +1,14 @@
+2017-01-09  Chris Dumez  <[email protected]>
+
+        [iOS] Drop VNodeTracker
+        https://bugs.webkit.org/show_bug.cgi?id=166868
+        <rdar://problem/29937587>
+
+        Reviewed by Andreas Kling.
+
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+
 2017-01-09  Enrica Casucci  <[email protected]>
 
         Selection animation flashing on editable content when zooming.

Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (210531 => 210532)


--- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm	2017-01-10 00:32:24 UTC (rev 210531)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm	2017-01-10 00:46:04 UTC (rev 210532)
@@ -53,7 +53,6 @@
 #import <WebCore/NSAccessibilitySPI.h>
 #import <WebCore/PerformanceLogging.h>
 #import <WebCore/RuntimeApplicationChecks.h>
-#import <WebCore/VNodeTracker.h>
 #import <WebCore/WebCoreNSURLExtras.h>
 #import <WebCore/pthreadSPI.h>
 #import <WebKitSystemInterface.h>
@@ -124,15 +123,6 @@
     WebCore::registerMemoryReleaseNotifyCallbacks();
     MemoryPressureHandler::ReliefLogger::setLoggingEnabled(parameters.shouldEnableMemoryPressureReliefLogging);
 
-#if PLATFORM(IOS)
-    // Track the number of vnodes we are using on iOS and make sure we only use a
-    // reasonable amount because limits are fairly low on iOS devices and we can
-    // get killed when reaching the limit.
-    VNodeTracker::singleton().setPressureHandler([] (Critical critical) {
-        MemoryPressureHandler::singleton().releaseMemory(critical);
-    });
-#endif
-
     setEnhancedAccessibility(parameters.accessibilityEnhancedUserInterfaceEnabled);
 
 #if USE(APPKIT)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to