Changeset 254487 in webkit
- Timestamp:
- Jan 13, 2020 8:21:33 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r254472 r254487 1 2020-01-13 Keith Rollin <krollin@apple.com> 2 3 Reformat WebProcessPool logging 4 https://bugs.webkit.org/show_bug.cgi?id=205882 5 <rdar://problem/58384349> 6 7 Reviewed by Brent Fulgham. 8 9 Update the format used by WebProcessPool in its RELEASE_LOG logging. 10 Use the format used by WebPageProxy and NetworkResourceLoader, which 11 is generally of the form: 12 13 <object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values> 14 15 So, for example: 16 17 Using prewarmed process 0 18 19 becomes: 20 21 0x7f81e8804008 - WebProcessPool::processForRegistrableDomain: Using prewarmed process (process=0x1471c2a00, PID=64197) 22 23 No new tests - no added or changed functionality. 24 25 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 26 (WebKit::WebProcessPool::applicationIsAboutToSuspend): 27 * UIProcess/WebProcessPool.cpp: 28 (WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess): 29 (WebKit::WebProcessPool::tryTakePrewarmedProcess): 30 (WebKit::WebProcessPool::prewarmProcess): 31 (WebKit::WebProcessPool::processForRegistrableDomain): 32 (WebKit::WebProcessPool::didReachGoodTimeToPrewarm): 33 (WebKit::WebProcessPool::handleMemoryPressureWarning): 34 (WebKit::WebProcessPool::processForNavigation): 35 (WebKit::WebProcessPool::processForNavigationInternal): 36 (WebKit::WebProcessPool::setWebProcessHasUploads): 37 (WebKit::WebProcessPool::clearWebProcessHasUploads): 38 (WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia): 39 (WebKit::WebProcessPool::clearWebProcessIsPlayingAudibleMedia): 40 (WebKit::WebProcessPool::setUseSeparateServiceWorkerProcess): 41 1 42 2020-01-13 Kate Cheney <katherine_cheney@apple.com> 2 43 -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r254433 r254487 108 108 #endif 109 109 110 #define WEBPROCESSPOOL_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, "%p - WebProcessPool::" fmt, this, ##__VA_ARGS__) 111 110 112 namespace WebKit { 111 113 using namespace WebCore; … … 689 691 void WebProcessPool::applicationIsAboutToSuspend() 690 692 { 691 RELEASE_LOG(ProcessSuspension, "WebProcessPool::applicationIsAboutToSuspend()Terminating non-critical processes");693 WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "applicationIsAboutToSuspend: Terminating non-critical processes"); 692 694 693 695 m_backForwardCache->pruneToSize(1); -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r254433 r254487 137 137 #endif 138 138 139 #define WEBPROCESSPOOL_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, "%p - WebProcessPool::" fmt, this, ##__VA_ARGS__) 140 #define WEBPROCESSPOOL_RELEASE_LOG_ERROR(channel, fmt, ...) RELEASE_LOG_ERROR(channel, "%p - WebProcessPool::" fmt, this, ##__VA_ARGS__) 141 #define WEBPROCESSPOOL_RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), channel, "%p - WebProcessPool::" fmt, this, ##__VA_ARGS__) 142 139 143 namespace WebKit { 140 144 using namespace WebCore; … … 740 744 RegistrableDomainWithSessionID registrableDomainWithSessionID { RegistrableDomain { registrableDomain }, sessionID }; 741 745 if (m_serviceWorkerProcesses.contains(registrableDomainWithSessionID)) { 742 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ServiceWorker, "WebProcessPool::establishWorkerContextConnectionToNetworkProcess process already created");746 WEBPROCESSPOOL_RELEASE_LOG_IF_ALLOWED(ServiceWorker, "establishWorkerContextConnectionToNetworkProcess process already created"); 743 747 return; 744 748 } … … 760 764 serviceWorkerProcessProxy->enableServiceWorkers(userContentControllerIdentifierForServiceWorkers()); 761 765 762 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ServiceWorker, "WebProcessPool::establishWorkerContextConnectionToNetworkProcess reusing an existing web process %p, process identifier %d", serviceWorkerProcessProxy, serviceWorkerProcessProxy->processIdentifier());766 WEBPROCESSPOOL_RELEASE_LOG_IF_ALLOWED(ServiceWorker, "establishWorkerContextConnectionToNetworkProcess reusing an existing web process (process=%p, PID=%d)", serviceWorkerProcessProxy, serviceWorkerProcessProxy->processIdentifier()); 763 767 break; 764 768 } … … 769 773 serviceWorkerProcessProxy = newProcessProxy.ptr(); 770 774 771 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ServiceWorker, "WebProcessPool::establishWorkerContextConnectionToNetworkProcess creating a new service worker process %p, process identifier %d", serviceWorkerProcessProxy, serviceWorkerProcessProxy->processIdentifier());775 WEBPROCESSPOOL_RELEASE_LOG_IF_ALLOWED(ServiceWorker, "establishWorkerContextConnectionToNetworkProcess creating a new service worker process (proces=%p, PID=%d)", serviceWorkerProcessProxy, serviceWorkerProcessProxy->processIdentifier()); 772 776 773 777 initializeNewWebProcess(newProcessProxy, websiteDataStore); … … 848 852 // from suspension) so make sure the process is still running here before deciding to use it. 849 853 if (m_prewarmedProcess->wasTerminated()) { 850 RELEASE_LOG_ERROR(Process, "Not using prewarmed process %d because it has been terminated", m_prewarmedProcess->processIdentifier());854 WEBPROCESSPOOL_RELEASE_LOG_ERROR(Process, "tryTakePrewarmedProcess: Not using prewarmed process because it has been terminated (process=%p, PID=%d)", m_prewarmedProcess, m_prewarmedProcess->processIdentifier()); 851 855 m_prewarmedProcess = nullptr; 852 856 return nullptr; … … 1075 1079 return; 1076 1080 1077 RELEASE_LOG(PerformanceLogging, "Prewarming a WebProcess for performance");1081 WEBPROCESSPOOL_RELEASE_LOG(PerformanceLogging, "prewarmProcess: Prewarming a WebProcess for performance"); 1078 1082 createNewWebProcess(nullptr, WebProcessProxy::IsPrewarmed::Yes); 1079 1083 } … … 1178 1182 // Check if we have a suspended page for the given registrable domain and use its process if we do, for performance reasons. 1179 1183 if (auto process = SuspendedPageProxy::findReusableSuspendedPageProcess(*this, registrableDomain, websiteDataStore)) { 1180 RELEASE_LOG(ProcessSwapping, "Using WebProcess %i from a SuspendedPage", process->processIdentifier());1184 WEBPROCESSPOOL_RELEASE_LOG(ProcessSwapping, "processForRegistrableDomain: Using WebProcess from a SuspendedPage (process=%p, PID=%i)", process.get(), process->processIdentifier()); 1181 1185 return *process; 1182 1186 } … … 1184 1188 1185 1189 if (auto process = tryTakePrewarmedProcess(websiteDataStore)) { 1186 RELEASE_LOG(ProcessSwapping, "Using prewarmed process %i", process->processIdentifier());1190 WEBPROCESSPOOL_RELEASE_LOG(ProcessSwapping, "processForRegistrableDomain: Using prewarmed process (process=%p, PID=%i)", process.get(), process->processIdentifier()); 1187 1191 if (!registrableDomain.isEmpty()) 1188 1192 tryPrewarmWithDomainInformation(*process, registrableDomain); … … 1398 1402 if (MemoryPressureHandler::singleton().isUnderMemoryPressure()) { 1399 1403 if (!m_prewarmedProcess) 1400 RELEASE_LOG(PerformanceLogging, "Not automatically prewarming a WebProcess due to memory pressure");1404 WEBPROCESSPOOL_RELEASE_LOG(PerformanceLogging, "didReachGoodTimeToPrewarm: Not automatically prewarming a WebProcess due to memory pressure"); 1401 1405 return; 1402 1406 } … … 1419 1423 void WebProcessPool::handleMemoryPressureWarning(Critical) 1420 1424 { 1421 RELEASE_LOG(PerformanceLogging, "%p - WebProcessPool::handleMemoryPressureWarning", this);1425 WEBPROCESSPOOL_RELEASE_LOG(PerformanceLogging, "handleMemoryPressureWarning:"); 1422 1426 1423 1427 // Clear back/forward cache first as processes removed from the back/forward cache will likely … … 2137 2141 bool doingAnAutomaticProcessSwap = processSwapRequestedByClient == ProcessSwapRequestedByClient::No && process.ptr() != sourceProcess.ptr(); 2138 2142 if (doingAnAutomaticProcessSwap && !configuration().wasAutomaticProcessWarmingSetByClient() && !configuration().clientWouldBenefitFromAutomaticProcessPrewarming()) { 2139 RELEASE_LOG(PerformanceLogging, "Automatically turning on process prewarming because the client would benefit from it");2143 WEBPROCESSPOOL_RELEASE_LOG(PerformanceLogging, "processForNavigation: Automatically turning on process prewarming because the client would benefit from it"); 2140 2144 configuration().setClientWouldBenefitFromAutomaticProcessPrewarming(true); 2141 2145 } … … 2225 2229 if (sourceURL.isEmpty() && page.configuration().relatedPage()) { 2226 2230 sourceURL = URL { { }, page.configuration().relatedPage()->pageLoadState().url() }; 2227 RELEASE_LOG(ProcessSwapping, "Using related page %p's URL as source URL for process swap decision", page.configuration().relatedPage());2231 WEBPROCESSPOOL_RELEASE_LOG(ProcessSwapping, "processForNavigationInternal: Using related page's URL as source URL for process swap decision (page=%p)", page.configuration().relatedPage()); 2228 2232 } 2229 2233 … … 2345 2349 return; 2346 2350 2347 RELEASE_LOG(ProcessSuspension, "Web process pid %u now has uploads in progress", (unsigned)process->processIdentifier());2351 WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "setWebProcessHasUploads: Web process now has uploads in progress (process=%p, PID=%i)", process, process->processIdentifier()); 2348 2352 2349 2353 if (m_processesWithUploads.isEmpty()) { 2350 RELEASE_LOG(ProcessSuspension, "The number of uploads in progress is now one. Taking Networking and UI process assertions.");2354 WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "setWebProcessHasUploads: The number of uploads in progress is now one. Taking Networking and UI process assertions."); 2351 2355 2352 2356 ASSERT(m_networkProcess); … … 2371 2375 auto* process = WebProcessProxy::processForIdentifier(processID); 2372 2376 ASSERT_UNUSED(process, process); 2373 RELEASE_LOG(ProcessSuspension, "Web process pid %u no longer has uploads in progress", (unsigned)process->processIdentifier());2377 WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "clearWebProcessHasUploads: Web process no longer has uploads in progress (process=%p, PID=%i)", process, process->processIdentifier()); 2374 2378 2375 2379 if (m_processesWithUploads.isEmpty()) { 2376 RELEASE_LOG(ProcessSuspension, "The number of uploads in progress is now zero. Releasing Networking and UI process assertions.");2380 WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "clearWebProcessHasUploads: The number of uploads in progress is now zero. Releasing Networking and UI process assertions."); 2377 2381 2378 2382 if (m_networkProcess) … … 2390 2394 ASSERT(process); 2391 2395 2392 RELEASE_LOG(ProcessSuspension, "Web process pid %u is now playing audible media", (unsigned)process->processIdentifier());2396 WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "setWebProcessIsPlayingAudibleMedia: Web process is now playing audible media (process=%p, PID=%i)", process, process->processIdentifier()); 2393 2397 2394 2398 if (m_processesPlayingAudibleMedia.isEmpty()) { 2395 RELEASE_LOG(ProcessSuspension, "The number of processes playing audible media is now one. Taking UI process assertion.");2399 WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "setWebProcessIsPlayingAudibleMedia: The number of processes playing audible media is now one. Taking UI process assertion."); 2396 2400 2397 2401 ASSERT(!m_uiProcessMediaPlaybackAssertion); … … 2412 2416 ASSERT_UNUSED(process, process); 2413 2417 2414 RELEASE_LOG(ProcessSuspension, "Web process pid %u is no longer playing audible media", (unsigned)process->processIdentifier());2418 WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "clearWebProcessIsPlayingAudibleMedia: Web process is no longer playing audible media (process=%p, PID=%i)", process, process->processIdentifier()); 2415 2419 2416 2420 if (m_processesPlayingAudibleMedia.isEmpty()) { 2417 RELEASE_LOG(ProcessSuspension, "The number of processes playing audible media now zero. Releasing UI process assertion.");2421 WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "clearWebProcessIsPlayingAudibleMedia: The number of processes playing audible media now zero. Releasing UI process assertion."); 2418 2422 2419 2423 ASSERT(m_uiProcessMediaPlaybackAssertion); … … 2427 2431 return; 2428 2432 2429 RELEASE_LOG(ServiceWorker, "WebProcessPool::setUseSeparateServiceWorkerProcess %d", useSeparateServiceWorkerProcess);2433 WEBPROCESSPOOL_RELEASE_LOG(ServiceWorker, "setUseSeparateServiceWorkerProcess: (useSeparateServiceWorkerProcess=%d)", useSeparateServiceWorkerProcess); 2430 2434 2431 2435 m_useSeparateServiceWorkerProcess = useSeparateServiceWorkerProcess;
Note: See TracChangeset
for help on using the changeset viewer.