Changeset 202575 in webkit
- Timestamp:
- Jun 28, 2016 11:08:39 AM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r202574 r202575 1 2016-06-28 Chris Dumez <cdumez@apple.com> 2 3 Add some more UIProcess-side logging related to process assertions 4 https://bugs.webkit.org/show_bug.cgi?id=159188 5 6 Reviewed by Andreas Kling. 7 8 Add some more UIProcess-side logging related to process assertions 9 to help debug process suspension issues. 10 11 * UIProcess/Network/NetworkProcessProxy.cpp: 12 (WebKit::NetworkProcessProxy::fetchWebsiteData): 13 (WebKit::NetworkProcessProxy::deleteWebsiteData): 14 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins): 15 * UIProcess/ProcessThrottler.cpp: 16 (WebKit::ProcessThrottler::updateAssertionNow): 17 (WebKit::ProcessThrottler::updateAssertion): 18 * UIProcess/WebPageProxy.cpp: 19 (WebKit::WebPageProxy::updateActivityToken): 20 * UIProcess/WebProcessProxy.cpp: 21 (WebKit::WebProcessProxy::fetchWebsiteData): 22 (WebKit::WebProcessProxy::deleteWebsiteData): 23 (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins): 24 (WebKit::WebProcessProxy::didSetAssertionState): 25 1 26 2016-06-28 Chris Dumez <cdumez@apple.com> 2 27 -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
r202511 r202575 127 127 uint64_t callbackID = generateCallbackID(); 128 128 auto token = throttler().backgroundActivityToken(); 129 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), " UIProcess is taking a background assertion because the Network process is fetching Website data");130 131 m_pendingFetchWebsiteDataCallbacks.add(callbackID, [t oken, completionHandler, sessionID](WebsiteData websiteData) {129 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is fetching Website data", this); 130 131 m_pendingFetchWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID](WebsiteData websiteData) { 132 132 completionHandler(WTFMove(websiteData)); 133 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), " UIProcess is releasing a background assertion because the Network process is done fetching Website data");133 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done fetching Website data", this); 134 134 }); 135 135 … … 141 141 auto callbackID = generateCallbackID(); 142 142 auto token = throttler().backgroundActivityToken(); 143 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), " UIProcess is taking a background assertion because the Network process is deleting Website data");144 145 m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [t oken, completionHandler, sessionID] {143 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data", this); 144 145 m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID] { 146 146 completionHandler(); 147 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), " UIProcess is releasing a background assertion because the Network process is done deleting Website data");147 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data", this); 148 148 }); 149 149 send(Messages::NetworkProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince, callbackID), 0); … … 156 156 uint64_t callbackID = generateCallbackID(); 157 157 auto token = throttler().backgroundActivityToken(); 158 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), " UIProcess is taking a background assertion because the Network process is deleting Website data for several origins");159 160 m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [t oken, completionHandler, sessionID] {158 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data for several origins", this); 159 160 m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [this, token, completionHandler, sessionID] { 161 161 completionHandler(); 162 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), " UIProcess is releasing a background assertion because the Network process is done deleting Website data for several origins");162 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data for several origins", this); 163 163 }); 164 164 -
trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp
r197360 r202575 57 57 m_suspendTimer.stop(); 58 58 if (m_assertion) { 59 if (m_assertion->state() != assertionState()) 60 LOG_ALWAYS(true, "%p - ProcessThrottler::updateAssertionNow() updating process assertion state to %u (foregroundActivities: %lu, backgroundActivities: %lu)", this, assertionState(), m_foregroundCounter.value(), m_backgroundCounter.value()); 59 61 m_assertion->setState(assertionState()); 60 62 m_process.didSetAssertionState(assertionState()); … … 69 71 if (m_assertion && m_assertion->state() != AssertionState::Suspended && !m_foregroundCounter.value() && !m_backgroundCounter.value()) { 70 72 ++m_suspendMessageCount; 73 LOG_ALWAYS(true, "%p - ProcessThrottler::updateAssertion() sending PrepareToSuspend IPC", this); 71 74 m_process.sendPrepareToSuspend(); 72 75 m_suspendTimer.startOneShot(processSuspensionTimeout); … … 75 78 return; 76 79 } 77 80 78 81 bool shouldBeRunnable = m_foregroundCounter.value() || m_backgroundCounter.value(); 79 82 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r202574 r202575 1508 1508 #if PLATFORM(IOS) 1509 1509 if (!isViewVisible() && !m_alwaysRunsAtForegroundPriority) { 1510 WEBPAGEPROXY_LOG_ALWAYS("UIProcess is releasing a foreground assertion because the view is no longer visible"); 1511 m_activityToken = nullptr; 1510 if (m_activityToken) { 1511 WEBPAGEPROXY_LOG_ALWAYS("%p - UIProcess is releasing a foreground assertion because the view is no longer visible", this); 1512 m_activityToken = nullptr; 1513 } 1512 1514 } else if (!m_activityToken) { 1513 1515 if (isViewVisible()) 1514 WEBPAGEPROXY_LOG_ALWAYS(" UIProcess is taking a foreground assertion because the view is visible");1516 WEBPAGEPROXY_LOG_ALWAYS("%p - UIProcess is taking a foreground assertion because the view is visible", this); 1515 1517 else 1516 WEBPAGEPROXY_LOG_ALWAYS(" UIProcess is taking a foreground assertion even though the view is not visible because m_alwaysRunsAtForegroundPriority is true");1518 WEBPAGEPROXY_LOG_ALWAYS("%p - UIProcess is taking a foreground assertion even though the view is not visible because m_alwaysRunsAtForegroundPriority is true", this); 1517 1519 m_activityToken = m_process->throttler().foregroundActivityToken(); 1518 1520 } -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r202331 r202575 728 728 uint64_t callbackID = generateCallbackID(); 729 729 auto token = throttler().backgroundActivityToken(); 730 731 m_pendingFetchWebsiteDataCallbacks.add(callbackID, [token, completionHandler](WebsiteData websiteData) { 730 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is fetching Website data", this); 731 732 m_pendingFetchWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID](WebsiteData websiteData) { 732 733 completionHandler(WTFMove(websiteData)); 734 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done fetching Website data", this); 733 735 }); 734 736 … … 742 744 uint64_t callbackID = generateCallbackID(); 743 745 auto token = throttler().backgroundActivityToken(); 744 745 m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [token, completionHandler] { 746 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data", this); 747 748 m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID] { 746 749 completionHandler(); 750 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data", this); 747 751 }); 748 752 send(Messages::WebProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince, callbackID), 0); … … 755 759 uint64_t callbackID = generateCallbackID(); 756 760 auto token = throttler().backgroundActivityToken(); 757 758 m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [token, completionHandler] { 761 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data for several origins", this); 762 763 m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [this, token, completionHandler, sessionID] { 759 764 completionHandler(); 765 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data for several origins", this); 760 766 }); 761 767 … … 960 966 switch (state) { 961 967 case AssertionState::Suspended: 968 LOG_ALWAYS(true, "%p - WebProcessProxy::didSetAssertionState(Suspended) release all assertions for network process", this); 962 969 m_foregroundTokenForNetworkProcess = nullptr; 963 970 m_backgroundTokenForNetworkProcess = nullptr; … … 967 974 968 975 case AssertionState::Background: 976 LOG_ALWAYS(true, "%p - WebProcessProxy::didSetAssertionState(Background) taking background assertion for network process", this); 969 977 m_backgroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().backgroundActivityToken(); 970 978 m_foregroundTokenForNetworkProcess = nullptr; … … 972 980 973 981 case AssertionState::Foreground: 982 LOG_ALWAYS(true, "%p - WebProcessProxy::didSetAssertionState(Foreground) taking foreground assertion for network process", this); 974 983 m_foregroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().foregroundActivityToken(); 975 984 m_backgroundTokenForNetworkProcess = nullptr;
Note: See TracChangeset
for help on using the changeset viewer.