Changeset 205275 in webkit
- Timestamp:
- Aug 31, 2016 6:33:40 PM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 48 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r205273 r205275 1 2016-08-31 Keith Rollin <krollin@apple.com> 2 3 WebKit should set a subsystem for os_log so it's easier to filter for WebKit log messages 4 https://bugs.webkit.org/show_bug.cgi?id=160969 5 <rdar://problem/26068734> 6 7 Reviewed by Simon Fraser. 8 9 Add support for attaching a subsystem and category when logging via 10 the RELEASE_LOG macros. This support is provided by adding subsystem 11 and category information to WTFLogChannel. An os_log_t object is then 12 created to enacpsulate that information. When using RELEASE_LOG to log 13 through that channel, the associated log object is used when calling 14 os_log. 15 16 To help support the inclusion of the subsystem and category 17 information in WTFLogChannel, the DECLARE_LOG_CHANNEL, 18 DEFINE_LOG_CHANNEL, and LOG_CHANNEL_ADDRESS macros that were defined 19 in various modules are consolidated and moved to Assertions.h. 20 DEFINE_LOG_CHANNEL is now defined to initialize the subsystem and 21 category. 22 23 * wtf/Assertions.cpp: 24 * wtf/Assertions.h: 25 * wtf/RefCountedLeakCounter.cpp: 26 1 27 2016-08-31 Alex Christensen <achristensen@webkit.org> 2 28 -
trunk/Source/WTF/wtf/Assertions.cpp
r202782 r205275 556 556 void WTFInitializeLogChannelStatesFromString(WTFLogChannel* channels[], size_t count, const char* logLevel) 557 557 { 558 #if !RELEASE_LOG_DISABLED 559 for (size_t i = 0; i < count; ++i) { 560 WTFLogChannel* channel = channels[i]; 561 channel->osLogChannel = os_log_create(channel->subsystem, channel->name); 562 } 563 #endif 564 558 565 String logLevelString = logLevel; 559 566 Vector<String> components; -
trunk/Source/WTF/wtf/Assertions.h
r204472 r205275 136 136 WTFLogChannelState state; 137 137 const char* name; 138 #if !RELEASE_LOG_DISABLED 139 const char* subsystem; 140 __unsafe_unretained os_log_t osLogChannel; 141 #endif 138 142 } WTFLogChannel; 143 144 #define LOG_CHANNEL(name) JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name) 145 #define LOG_CHANNEL_ADDRESS(name) &LOG_CHANNEL(name), 146 #define JOIN_LOG_CHANNEL_WITH_PREFIX(prefix, channel) JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel) 147 #define JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel) prefix ## channel 148 149 #define LOG_CHANNEL_WEBKIT_SUBSYSTEM "com.apple.WebKit" 150 151 #define DECLARE_LOG_CHANNEL(name) \ 152 extern WTFLogChannel LOG_CHANNEL(name); 153 154 #if !defined(DEFINE_LOG_CHANNEL) 155 #if RELEASE_LOG_DISABLED 156 #define DEFINE_LOG_CHANNEL(name, subsystem) \ 157 WTFLogChannel LOG_CHANNEL(name) = { WTFLogChannelOff, #name }; 158 #else 159 #define DEFINE_LOG_CHANNEL(name, subsystem) \ 160 WTFLogChannel LOG_CHANNEL(name) = { WTFLogChannelOff, #name, subsystem, OS_LOG_DEFAULT }; 161 #endif 162 #endif 139 163 140 164 WTF_EXPORT_PRIVATE void WTFReportAssertionFailure(const char* file, int line, const char* function, const char* assertion); … … 368 392 #define LOG(channel, ...) ((void)0) 369 393 #else 370 #define LOG(channel, ...) WTFLog(&JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__) 371 #define JOIN_LOG_CHANNEL_WITH_PREFIX(prefix, channel) JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel) 372 #define JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel) prefix ## channel 394 #define LOG(channel, ...) WTFLog(&LOG_CHANNEL(channel), __VA_ARGS__) 373 395 #endif 374 396 … … 378 400 #define LOG_VERBOSE(channel, ...) ((void)0) 379 401 #else 380 #define LOG_VERBOSE(channel, ...) WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, & JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX,channel), __VA_ARGS__)402 #define LOG_VERBOSE(channel, ...) WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, &LOG_CHANNEL(channel), __VA_ARGS__) 381 403 #endif 382 404 383 405 /* RELEASE_LOG */ 384 406 385 #define WTF_LOGGING_PREFIX "#WK: "386 407 #if RELEASE_LOG_DISABLED 387 #define RELEASE_LOG(format, ...) ((void)0) 388 #define RELEASE_LOG_ERROR(format, ...) WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, format, ##__VA_ARGS__) 389 #else 390 #define WTF_LOG_DEFAULT OS_LOG_DEFAULT 391 #define RELEASE_LOG(format, ...) os_log(WTF_LOG_DEFAULT, WTF_LOGGING_PREFIX format, ##__VA_ARGS__) 392 #define RELEASE_LOG_ERROR(format, ...) os_log_error(WTF_LOG_DEFAULT, WTF_LOGGING_PREFIX format, ##__VA_ARGS__) 393 #endif 394 #define RELEASE_LOG_IF(isAllowed, format, ...) do { if (isAllowed) RELEASE_LOG(format, ##__VA_ARGS__); } while (0) 395 #define RELEASE_LOG_ERROR_IF(isAllowed, format, ...) do { if (isAllowed) RELEASE_LOG_ERROR(format, ##__VA_ARGS__); } while (0) 408 #define RELEASE_LOG( channel, format, ...) ((void)0) 409 #define RELEASE_LOG_ERROR(channel, format, ...) LOG_ERROR(format, ##__VA_ARGS__) 410 411 #define RELEASE_LOG_IF( isAllowed, channel, format, ...) ((void)0) 412 #define RELEASE_LOG_ERROR_IF(isAllowed, channel, format, ...) do { if (isAllowed) RELEASE_LOG_ERROR(channel, format, ##__VA_ARGS__); } while (0) 413 #else 414 #define RELEASE_LOG( channel, format, ...) os_log( LOG_CHANNEL(channel).osLogChannel, format, ##__VA_ARGS__) 415 #define RELEASE_LOG_ERROR(channel, format, ...) os_log_error(LOG_CHANNEL(channel).osLogChannel, format, ##__VA_ARGS__) 416 417 #define RELEASE_LOG_IF( isAllowed, channel, format, ...) do { if (isAllowed) RELEASE_LOG( channel, format, ##__VA_ARGS__); } while (0) 418 #define RELEASE_LOG_ERROR_IF(isAllowed, channel, format, ...) do { if (isAllowed) RELEASE_LOG_ERROR(channel, format, ##__VA_ARGS__); } while (0) 419 #endif 420 396 421 397 422 /* RELEASE_ASSERT */ -
trunk/Source/WTF/wtf/RefCountedLeakCounter.cpp
r162777 r205275 40 40 41 41 #define LOG_CHANNEL_PREFIX Log 42 #if RELEASE_LOG_DISABLED 42 43 static WTFLogChannel LogRefCountedLeaks = { WTFLogChannelOn, "RefCountedLeaks" }; 44 #else 45 static WTFLogChannel LogRefCountedLeaks = { WTFLogChannelOn, "RefCountedLeaks", LOG_CHANNEL_WEBKIT_SUBSYSTEM, OS_LOG_DEFAULT }; 46 #endif 43 47 44 48 typedef HashCountedSet<const char*, PtrHash<const char*>> ReasonSet; -
trunk/Source/WebCore/ChangeLog
r205274 r205275 1 2016-08-31 Keith Rollin <krollin@apple.com> 2 3 WebKit should set a subsystem for os_log so it's easier to filter for WebKit log messages 4 https://bugs.webkit.org/show_bug.cgi?id=160969 5 <rdar://problem/26068734> 6 7 Reviewed by Simon Fraser. 8 9 - Specify a channel when using RELEASE_LOG macros 10 - Add a new channel so that we have something to pass to the 11 RELEASE_LOG macros (Layers). 12 - Enable subsystem- and channel-related data and functions when using 13 RELEASE_LOG macros. 14 - Use the DECLARE_LOG_CHANNEL, DEFINE_LOG_CHANNEL, and 15 LOG_CHANNEL_ADDRESS macros that are now defined in WTF. 16 17 No new tests. There are no tests for logging. 18 19 * loader/FrameLoader.cpp: 20 * platform/LogInitialization.h: 21 * platform/LogMacros.h: 22 * platform/Logging.cpp: 23 * platform/Logging.h: 24 * platform/MemoryPressureHandler.cpp: 25 (WebCore::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange): 26 * platform/graphics/cg/GraphicsContextCG.cpp: 27 (WebCore::GraphicsContext::drawNativeImage): 28 * platform/graphics/cocoa/IOSurface.mm: 29 (WebCore::IOSurface::IOSurface): 30 * platform/mac/LoggingMac.mm: 31 * platform/unix/LoggingUnix.cpp: 32 * platform/win/LoggingWin.cpp: 33 * testing/js/WebCoreTestSupport.cpp: 34 (WebCoreTestSupport::initializeLogChannelsIfNecessary): 35 1 36 2016-08-31 Ricky Mondello <rmondello@apple.com> 2 37 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r205249 r205275 143 143 #endif 144 144 145 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)145 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__) 146 146 147 147 namespace WebCore { -
trunk/Source/WebCore/platform/LogInitialization.h
r203749 r205275 31 31 namespace WebCore { 32 32 33 #if !LOG_DISABLED 33 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 34 34 35 35 String logLevelString(); … … 38 38 WEBCORE_EXPORT void initializeLogChannelsIfNecessary(); 39 39 40 #endif // !LOG_DISABLED 40 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED 41 41 42 42 } // namespace WebCore -
trunk/Source/WebCore/platform/LogMacros.h
r203749 r205275 28 28 #include <functional> 29 29 30 #if LOG_DISABLED 30 #if LOG_DISABLED && RELEASE_LOG_DISABLED 31 31 32 32 #define LOG_RESULT(channel, function) ((void)0) … … 48 48 }); 49 49 50 #endif // !LOG_DISABLED 50 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED -
trunk/Source/WebCore/platform/Logging.cpp
r203749 r205275 36 36 #endif 37 37 38 #if !LOG_DISABLED 38 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 39 39 40 40 namespace WebCore { 41 41 42 #define DEFINE_LOG_CHANNEL(name) \ 43 WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name) = { WTFLogChannelOff, #name }; 44 WEBCORE_LOG_CHANNELS(DEFINE_LOG_CHANNEL) 42 #define DEFINE_WEBCORE_LOG_CHANNEL(name) DEFINE_LOG_CHANNEL(name, LOG_CHANNEL_WEBKIT_SUBSYSTEM) 43 WEBCORE_LOG_CHANNELS(DEFINE_WEBCORE_LOG_CHANNEL) 45 44 46 #define LOG_CHANNEL_ADDRESS(name) &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name), 47 WTFLogChannel* logChannels[] = { 45 static WTFLogChannel* logChannels[] = { 48 46 WEBCORE_LOG_CHANNELS(LOG_CHANNEL_ADDRESS) 49 47 }; 50 48 51 s ize_t logChannelCount = WTF_ARRAY_LENGTH(logChannels);49 static const size_t logChannelCount = WTF_ARRAY_LENGTH(logChannels); 52 50 53 51 bool isLogChannelEnabled(const String& name) … … 103 101 } // namespace WebCore 104 102 105 #endif // !LOG_DISABLED 103 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED -
trunk/Source/WebCore/platform/Logging.h
r204544 r205275 32 32 namespace WebCore { 33 33 34 #if !LOG_DISABLED 34 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 35 35 36 36 #ifndef LOG_CHANNEL_PREFIX … … 47 47 M(Editing) \ 48 48 M(Events) \ 49 M(FTP) \50 49 M(FileAPI) \ 51 50 M(Frames) \ 51 M(FTP) \ 52 52 M(Fullscreen) \ 53 53 M(Gamepad) \ … … 56 56 M(Images) \ 57 57 M(IndexedDB) \ 58 M(Layers) \ 58 59 M(Layout) \ 59 60 M(Loading) \ … … 71 72 M(RemoteInspector) \ 72 73 M(ResourceLoading) \ 74 M(ResourceLoadObserver) \ 75 M(Scrolling) \ 76 M(Services) \ 77 M(SpellingAndGrammar) \ 73 78 M(SQLDatabase) \ 79 M(StorageAPI) \ 74 80 M(SVG) \ 75 M(Services) \76 M(Scrolling) \77 M(SpellingAndGrammar) \78 M(StorageAPI) \79 81 M(TextAutosizing) \ 80 82 M(Threading) \ … … 84 86 M(WebReplay) \ 85 87 M(WheelEventTestTriggers) \ 86 M(ResourceLoadObserver) \87 88 89 #undef DECLARE_LOG_CHANNEL 88 90 #define DECLARE_LOG_CHANNEL(name) \ 89 91 WEBCORE_EXPORT extern WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name); … … 98 100 #endif 99 101 100 #endif // !LOG_DISABLED 102 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED 101 103 102 104 } // namespace WebCore -
trunk/Source/WebCore/platform/MemoryPressureHandler.cpp
r204472 r205275 35 35 #include "HTMLMediaElement.h" 36 36 #include "InspectorInstrumentation.h" 37 #include "Logging.h" 37 38 #include "MemoryCache.h" 38 39 #include "Page.h" … … 221 222 #if !RELEASE_LOG_DISABLED 222 223 #define STRING_SPECIFICATION "%{public}s" 223 #define MEMORYPRESSURE_LOG(...) RELEASE_LOG( __VA_ARGS__)224 #define MEMORYPRESSURE_LOG(...) RELEASE_LOG(MemoryPressure, __VA_ARGS__) 224 225 #else 225 226 #define STRING_SPECIFICATION "%s" -
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
r201777 r205275 176 176 } 177 177 178 #if !LOG_DISABLED 178 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 179 179 double startTime = currentTime(); 180 180 #endif -
trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm
r204472 r205275 35 35 #import "ImageBuffer.h" 36 36 #import "ImageBufferDataCG.h" 37 #import "Logging.h" 37 38 #import "MachSendRight.h" 38 39 #import <wtf/Assertions.h> … … 212 213 m_totalBytes = IOSurfaceGetAllocSize(m_surface.get()); 213 214 else 214 RELEASE_LOG_ERROR( "Surface creation failed for size: (%d %d) and format: (%d)", size.width(), size.height(), format);215 RELEASE_LOG_ERROR(Layers, "Surface creation failed for size: (%d %d) and format: (%d)", size.width(), size.height(), format); 215 216 } 216 217 -
trunk/Source/WebCore/platform/mac/LoggingMac.mm
r165676 r205275 29 29 #include <wtf/text/WTFString.h> 30 30 31 #if !LOG_DISABLED 31 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 32 32 33 33 namespace WebCore { … … 42 42 } 43 43 44 #endif // !LOG_DISABLED 44 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED -
trunk/Source/WebCore/platform/unix/LoggingUnix.cpp
r199815 r205275 23 23 #include "Logging.h" 24 24 25 #if !LOG_DISABLED 25 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 26 26 27 27 #include <string.h> … … 47 47 } // namespace WebCore 48 48 49 #endif // !LOG_DISABLED 49 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED -
trunk/Source/WebCore/platform/win/LoggingWin.cpp
r173949 r205275 27 27 #include "Logging.h" 28 28 29 #if !LOG_DISABLED 29 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 30 30 31 31 #include <windows.h> … … 53 53 } // namespace WebCore 54 54 55 #endif // !LOG_DISABLED 55 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED -
trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp
r204853 r205275 111 111 void initializeLogChannelsIfNecessary() 112 112 { 113 #if !LOG_DISABLED 113 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 114 114 WebCore::initializeLogChannelsIfNecessary(); 115 115 #endif -
trunk/Source/WebKit/mac/ChangeLog
r205247 r205275 1 2016-08-31 Keith Rollin <krollin@apple.com> 2 3 WebKit should set a subsystem for os_log so it's easier to filter for WebKit log messages 4 https://bugs.webkit.org/show_bug.cgi?id=160969 5 <rdar://problem/26068734> 6 7 Reviewed by Simon Fraser. 8 9 Enable subsystem- and channel-related data and functions when using 10 RELEASE_LOG macros. Use the DECLARE_LOG_CHANNEL, DEFINE_LOG_CHANNEL, 11 and LOG_CHANNEL_ADDRESS macros that are now defined in WTF. 12 13 * Misc/WebKitLogging.h: 14 * Misc/WebKitLogging.m: 15 * WebView/WebView.mm: 16 (-[WebView _commonInitializationWithFrameName:groupName:]): 17 1 18 2016-08-31 Brady Eidson <beidson@apple.com> 2 19 -
trunk/Source/WebKit/mac/Misc/WebKitLogging.h
r203756 r205275 37 37 #endif 38 38 39 #if !LOG_DISABLED 39 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 40 40 41 41 #define WEBKIT_LOG_CHANNELS(M) \ … … 65 65 M(View) \ 66 66 67 #define DECLARE_LOG_CHANNEL(name) \68 extern WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name);69 70 67 WEBKIT_LOG_CHANNELS(DECLARE_LOG_CHANNEL) 71 68 … … 73 70 74 71 void WebKitInitializeLogChannelsIfNecessary(void); 75 #endif // !LOG_DISABLED 72 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED 76 73 77 74 void ReportDiscardedDelegateException(SEL delegateSelector, id exception); -
trunk/Source/WebKit/mac/Misc/WebKitLogging.m
r203749 r205275 29 29 #import "WebKitLogging.h" 30 30 31 #if !LOG_DISABLED 31 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 32 32 33 #define DEFINE_LOG_CHANNEL(name) \ 34 WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name) = { WTFLogChannelOff, #name }; 35 WEBKIT_LOG_CHANNELS(DEFINE_LOG_CHANNEL) 33 #define DEFINE_WEBKIT_LOG_CHANNEL(name) DEFINE_LOG_CHANNEL(name, LOG_CHANNEL_WEBKIT_SUBSYSTEM) 34 WEBKIT_LOG_CHANNELS(DEFINE_WEBKIT_LOG_CHANNEL) 36 35 37 #define LOG_CHANNEL_ADDRESS(name) &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name),38 36 static WTFLogChannel* logChannels[] = { 39 37 WEBKIT_LOG_CHANNELS(LOG_CHANNEL_ADDRESS) … … 59 57 } 60 58 61 #endif // !LOG_DISABLED 59 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED 62 60 63 61 void ReportDiscardedDelegateException(SEL delegateSelector, id exception) -
trunk/Source/WebKit/mac/WebView/WebView.mm
r205247 r205275 968 968 #endif 969 969 if (!didOneTimeInitialization) { 970 #if !LOG_DISABLED 970 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 971 971 WebKitInitializeLogChannelsIfNecessary(); 972 972 WebCore::initializeLogChannelsIfNecessary(); -
trunk/Source/WebKit/win/ChangeLog
r205116 r205275 1 2016-08-31 Keith Rollin <krollin@apple.com> 2 3 WebKit should set a subsystem for os_log so it's easier to filter for WebKit log messages 4 https://bugs.webkit.org/show_bug.cgi?id=160969 5 <rdar://problem/26068734> 6 7 Reviewed by Simon Fraser. 8 9 Enable subsystem- and channel-related data and functions when using 10 RELEASE_LOG macros. Use the DECLARE_LOG_CHANNEL, DEFINE_LOG_CHANNEL, 11 and LOG_CHANNEL_ADDRESS macros that are now defined in WTF. 12 13 * WebKitLogging.cpp: 14 * WebKitLogging.h: 15 * WebView.cpp: 16 (WebView::initWithFrame): 17 1 18 2016-08-16 Carlos Garcia Campos <cgarcia@igalia.com> 2 19 -
trunk/Source/WebKit/win/WebKitLogging.cpp
r203749 r205275 28 28 #include "WebKitLogging.h" 29 29 30 #if !LOG_DISABLED 30 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 31 31 32 #define DEFINE_LOG_CHANNEL(name) \ 33 WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name) = { WTFLogChannelOff, #name }; 34 WEBKIT_LOG_CHANNELS(DEFINE_LOG_CHANNEL) 32 #define DEFINE_WEBKIT_LOG_CHANNEL(name) DEFINE_LOG_CHANNEL(name, LOG_CHANNEL_WEBKIT_SUBSYSTEM) 33 WEBKIT_LOG_CHANNELS(DEFINE_WEBKIT_LOG_CHANNEL) 35 34 36 #define LOG_CHANNEL_ADDRESS(name) &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name),37 35 static WTFLogChannel* logChannels[] = { 38 36 WEBKIT_LOG_CHANNELS(LOG_CHANNEL_ADDRESS) … … 52 50 } 53 51 54 #endif // !LOG_DISABLED 52 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED -
trunk/Source/WebKit/win/WebKitLogging.h
r203749 r205275 31 31 #include <wtf/Assertions.h> 32 32 33 #if !LOG_DISABLED 33 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 34 34 35 35 #ifndef LOG_CHANNEL_PREFIX … … 63 63 M(View) \ 64 64 65 #define DECLARE_LOG_CHANNEL(name) \66 extern WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name);67 68 65 WEBKIT_LOG_CHANNELS(DECLARE_LOG_CHANNEL) 69 66 … … 72 69 void WebKitInitializeLogChannelsIfNecessary(void); 73 70 74 #endif // !LOG_DISABLED 71 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED 75 72 76 73 #endif -
trunk/Source/WebKit/win/WebView.cpp
r204293 r205275 2907 2907 static bool didOneTimeInitialization; 2908 2908 if (!didOneTimeInitialization) { 2909 #if !LOG_DISABLED 2909 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 2910 2910 initializeLogChannelsIfNecessary(); 2911 #endif // !LOG_DISABLED 2911 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED 2912 2912 2913 2913 // Initialize our platform strategies first before invoking the rest -
trunk/Source/WebKit2/ChangeLog
r205269 r205275 1 2016-08-31 Keith Rollin <krollin@apple.com> 2 3 WebKit should set a subsystem for os_log so it's easier to filter for WebKit log messages 4 https://bugs.webkit.org/show_bug.cgi?id=160969 5 <rdar://problem/26068734> 6 7 Reviewed by Simon Fraser. 8 9 - Specify a channel when using RELEASE_LOG macros. 10 - Add some new channels so that we have something to pass to the 11 RELEASE_LOG macros (ProcessSuspension, IPC, Layers). 12 - Enable subsystem- and channel-related data and functions when using 13 RELEASE_LOG macros. 14 - Use the DECLARE_LOG_CHANNEL, DEFINE_LOG_CHANNEL, and 15 LOG_CHANNEL_ADDRESS macros that are now defined in WTF. 16 17 * NetworkProcess/Downloads/Download.cpp: 18 * NetworkProcess/NetworkProcess.cpp: 19 (WebKit::NetworkProcess::prepareToSuspend): 20 (WebKit::NetworkProcess::cancelPrepareToSuspend): 21 (WebKit::NetworkProcess::processDidResume): 22 * NetworkProcess/NetworkResourceLoader.cpp: 23 * Platform/IPC/Connection.cpp: 24 (IPC::Connection::waitForSyncReply): 25 * Platform/LogInitialization.h: 26 * Platform/Logging.cpp: 27 (WebKit::initializeLogChannelsIfNecessary): 28 * Platform/Logging.h: 29 * Platform/foundation/LoggingFoundation.mm: 30 * Platform/unix/LoggingUnix.cpp: 31 * Shared/ChildProcess.cpp: 32 (WebKit::didCloseOnConnectionWorkQueue): 33 * Shared/WebKit2Initialize.cpp: 34 (WebKit::InitializeWebKit2): 35 * UIProcess/Cocoa/NavigationState.mm: 36 (WebKit::NavigationState::releaseNetworkActivityToken): 37 (WebKit::NavigationState::didChangeIsLoading): 38 * UIProcess/Network/NetworkProcessProxy.cpp: 39 (WebKit::NetworkProcessProxy::fetchWebsiteData): 40 (WebKit::NetworkProcessProxy::deleteWebsiteData): 41 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins): 42 (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): 43 * UIProcess/ProcessThrottler.cpp: 44 (WebKit::ProcessThrottler::updateAssertionNow): 45 (WebKit::ProcessThrottler::updateAssertion): 46 * UIProcess/WebPageProxy.cpp: 47 * UIProcess/WebProcessPool.cpp: 48 (WebKit::m_hiddenPageThrottlingTimer): 49 * UIProcess/WebProcessProxy.cpp: 50 (WebKit::WebProcessProxy::fetchWebsiteData): 51 (WebKit::WebProcessProxy::deleteWebsiteData): 52 (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins): 53 (WebKit::WebProcessProxy::didSetAssertionState): 54 (WebKit::WebProcessProxy::setIsHoldingLockedFiles): 55 * UIProcess/ios/ProcessAssertionIOS.mm: 56 (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]): 57 (WebKit::ProcessAssertion::ProcessAssertion): 58 * WebProcess/Network/WebLoaderStrategy.cpp: 59 * WebProcess/Network/WebResourceLoader.cpp: 60 * WebProcess/WebPage/WebPage.cpp: 61 (WebKit::WebPage::layerVolatilityTimerFired): 62 * WebProcess/WebProcess.cpp: 63 (WebKit::WebProcess::actualPrepareToSuspend): 64 (WebKit::WebProcess::processWillSuspendImminently): 65 (WebKit::WebProcess::prepareToSuspend): 66 (WebKit::WebProcess::cancelPrepareToSuspend): 67 (WebKit::WebProcess::markAllLayersVolatile): 68 (WebKit::WebProcess::processDidResume): 69 1 70 2016-08-31 Yoav Weiss <yoav@yoav.ws> 2 71 -
trunk/Source/WebKit2/NetworkProcess/Downloads/Download.cpp
r204472 r205275 32 32 #include "DownloadManager.h" 33 33 #include "DownloadProxyMessages.h" 34 #include "Logging.h" 34 35 #include "SandboxExtension.h" 35 36 #include "WebCoreArgumentCoders.h" … … 38 39 using namespace WebCore; 39 40 40 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)41 #define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)41 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__) 42 #define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__) 42 43 43 44 namespace WebKit { -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp
r205266 r205275 624 624 void NetworkProcess::prepareToSuspend() 625 625 { 626 RELEASE_LOG( "%p - NetworkProcess::prepareToSuspend()", this);626 RELEASE_LOG(ProcessSuspension, "%p - NetworkProcess::prepareToSuspend()", this); 627 627 lowMemoryHandler(Critical::Yes); 628 628 629 RELEASE_LOG( "%p - NetworkProcess::prepareToSuspend() Sending ProcessReadyToSuspend IPC message", this);629 RELEASE_LOG(ProcessSuspension, "%p - NetworkProcess::prepareToSuspend() Sending ProcessReadyToSuspend IPC message", this); 630 630 parentProcessConnection()->send(Messages::NetworkProcessProxy::ProcessReadyToSuspend(), 0); 631 631 } … … 637 637 // message. And NetworkProcessProxy expects to receive either a NetworkProcessProxy::ProcessReadyToSuspend- 638 638 // or NetworkProcessProxy::DidCancelProcessSuspension- message, but not both. 639 RELEASE_LOG( "%p - NetworkProcess::cancelPrepareToSuspend()", this);639 RELEASE_LOG(ProcessSuspension, "%p - NetworkProcess::cancelPrepareToSuspend()", this); 640 640 } 641 641 642 642 void NetworkProcess::processDidResume() 643 643 { 644 RELEASE_LOG( "%p - NetworkProcess::processDidResume()", this);644 RELEASE_LOG(ProcessSuspension, "%p - NetworkProcess::processDidResume()", this); 645 645 } 646 646 -
trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
r205052 r205275 50 50 using namespace WebCore; 51 51 52 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)53 #define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)52 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__) 53 #define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__) 54 54 55 55 namespace WebKit { -
trunk/Source/WebKit2/Platform/IPC/Connection.cpp
r205207 r205275 27 27 #include "Connection.h" 28 28 29 #include "Logging.h" 29 30 #include <memory> 30 31 #include <wtf/CurrentTime.h> … … 574 575 // any more incoming messages. 575 576 if (!isValid()) { 576 RELEASE_LOG_ERROR( "Connection::waitForSyncReply: Connection no longer valid, id = %" PRIu64, syncRequestID);577 RELEASE_LOG_ERROR(IPC, "Connection::waitForSyncReply: Connection no longer valid, id = %" PRIu64, syncRequestID); 577 578 didReceiveSyncReply(sendSyncOptions); 578 579 return nullptr; … … 585 586 } 586 587 587 RELEASE_LOG_ERROR( "Connection::waitForSyncReply: Timed-out while waiting for reply, id = %" PRIu64, syncRequestID);588 RELEASE_LOG_ERROR(IPC, "Connection::waitForSyncReply: Timed-out while waiting for reply, id = %" PRIu64, syncRequestID); 588 589 didReceiveSyncReply(sendSyncOptions); 589 590 -
trunk/Source/WebKit2/Platform/LogInitialization.h
r203749 r205275 28 28 #include <wtf/text/WTFString.h> 29 29 30 #if !LOG_DISABLED 30 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 31 31 32 32 namespace WebKit { … … 37 37 } // namespace WebKit 38 38 39 #endif // !LOG_DISABLED 39 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED -
trunk/Source/WebKit2/Platform/Logging.cpp
r203749 r205275 31 31 #include <wtf/text/CString.h> 32 32 33 #if !LOG_DISABLED 33 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 34 34 35 #define DEFINE_LOG_CHANNEL(name) \ 36 WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name) = { WTFLogChannelOff, #name }; 37 WEBKIT2_LOG_CHANNELS(DEFINE_LOG_CHANNEL) 35 #define DEFINE_WEBKIT2_LOG_CHANNEL(name) DEFINE_LOG_CHANNEL(name, LOG_CHANNEL_WEBKIT_SUBSYSTEM) 36 WEBKIT2_LOG_CHANNELS(DEFINE_WEBKIT2_LOG_CHANNEL) 38 37 39 #define LOG_CHANNEL_ADDRESS(name) &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name),40 38 static WTFLogChannel* logChannels[] = { 41 39 WEBKIT2_LOG_CHANNELS(LOG_CHANNEL_ADDRESS) … … 44 42 namespace WebKit { 45 43 46 const size_t logChannelCount = WTF_ARRAY_LENGTH(logChannels);44 static const size_t logChannelCount = WTF_ARRAY_LENGTH(logChannels); 47 45 48 46 void initializeLogChannelsIfNecessary() … … 63 61 } // namespace WebKit 64 62 65 #endif // !LOG_DISABLED 63 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED -
trunk/Source/WebKit2/Platform/Logging.h
r204886 r205275 32 32 #include <wtf/text/WTFString.h> 33 33 34 #if !LOG_DISABLED 34 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 35 35 36 36 #ifndef LOG_CHANNEL_PREFIX … … 45 45 M(ContextMenu) \ 46 46 M(Gamepad) \ 47 M(IconDatabase) \ 47 48 M(IDB) \ 48 M(IconDatabase) \49 49 M(IndexedDB) \ 50 50 M(InspectorServer) \ 51 M(IPC) \ 51 52 M(KeyHandling) \ 53 M(Layers) \ 52 54 M(Network) \ 53 55 M(NetworkCache) \ 56 M(NetworkCacheSpeculativePreloading) \ 54 57 M(NetworkCacheStorage) \ 55 M(Network CacheSpeculativePreloading) \58 M(NetworkScheduling) \ 56 59 M(NetworkSession) \ 57 M(NetworkScheduling) \58 60 M(Plugins) \ 59 61 M(Printing) \ 62 M(ProcessSuspension) \ 60 63 M(RemoteLayerTree) \ 61 64 M(Resize) \ … … 67 70 M(VisibleRects) \ 68 71 69 #define DECLARE_LOG_CHANNEL(name) \70 extern WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name);71 72 72 WEBKIT2_LOG_CHANNELS(DECLARE_LOG_CHANNEL) 73 73 … … 78 78 #endif 79 79 80 #endif // !LOG_DISABLED 80 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED 81 81 82 82 #endif // Logging_h -
trunk/Source/WebKit2/Platform/foundation/LoggingFoundation.mm
r203749 r205275 30 30 namespace WebKit { 31 31 32 #if !LOG_DISABLED 32 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 33 33 34 34 static NSString * const defaultsDomain = @"WebKit2Logging"; -
trunk/Source/WebKit2/Platform/unix/LoggingUnix.cpp
r200143 r205275 30 30 namespace WebKit { 31 31 32 #if !LOG_DISABLED 32 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 33 33 34 34 String logLevelString() … … 37 37 } 38 38 39 #endif // !LOG_DISABLED 39 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED 40 40 41 41 } -
trunk/Source/WebKit2/Shared/ChildProcess.cpp
r204472 r205275 27 27 #include "ChildProcess.h" 28 28 29 #include "Logging.h" 29 30 #include "SandboxInitializationParameters.h" 30 31 #include <unistd.h> … … 54 55 // global destructors or atexit handlers to be called from this thread while the main thread is busy 55 56 // doing its thing. 56 RELEASE_LOG_ERROR( "Exiting process early due to unacknowledged closed-connection");57 RELEASE_LOG_ERROR(IPC, "Exiting process early due to unacknowledged closed-connection"); 57 58 _exit(EXIT_FAILURE); 58 59 }); -
trunk/Source/WebKit2/Shared/WebKit2Initialize.cpp
r205266 r205275 57 57 RunLoop::initializeMainRunLoop(); 58 58 59 #if !LOG_DISABLED 59 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 60 60 WebCore::initializeLogChannelsIfNecessary(); 61 61 WebKit::initializeLogChannelsIfNecessary(); 62 #endif // !LOG_DISABLED 62 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED 63 63 } 64 64 -
trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
r204716 r205275 36 36 #import "AuthenticationDecisionListener.h" 37 37 #import "CompletionHandlerCallChecker.h" 38 #import "Logging.h" 38 39 #import "NavigationActionData.h" 39 40 #import "PageLoadState.h" … … 826 827 void NavigationState::releaseNetworkActivityToken() 827 828 { 828 RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), "%p UIProcess is releasing a background assertion because a page load completed", this);829 RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p UIProcess is releasing a background assertion because a page load completed", this); 829 830 ASSERT(m_activityToken); 830 831 m_activityToken = nullptr; … … 839 840 m_releaseActivityTimer.stop(); 840 841 else { 841 RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), "%p - UIProcess is taking a background assertion because a page load started", this);842 RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - UIProcess is taking a background assertion because a page load started", this); 842 843 ASSERT(!m_activityToken); 843 844 m_activityToken = m_webView->_page->process().throttler().backgroundActivityToken(); -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
r204996 r205275 31 31 #include "DatabaseProcessMessages.h" 32 32 #include "DownloadProxyMessages.h" 33 #include "Logging.h" 33 34 #include "NetworkProcessCreationParameters.h" 34 35 #include "NetworkProcessMessages.h" … … 126 127 uint64_t callbackID = generateCallbackID(); 127 128 auto token = throttler().backgroundActivityToken(); 128 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is fetching Website data", this);129 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NetworkProcessProxy is taking a background assertion because the Network process is fetching Website data", this); 129 130 130 131 m_pendingFetchWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID](WebsiteData websiteData) { 131 132 completionHandler(WTFMove(websiteData)); 132 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done fetching Website data", this);133 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done fetching Website data", this); 133 134 }); 134 135 … … 140 141 auto callbackID = generateCallbackID(); 141 142 auto token = throttler().backgroundActivityToken(); 142 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data", this);143 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data", this); 143 144 144 145 m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID] { 145 146 completionHandler(); 146 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data", this);147 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data", this); 147 148 }); 148 149 send(Messages::NetworkProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince, callbackID), 0); … … 155 156 uint64_t callbackID = generateCallbackID(); 156 157 auto token = throttler().backgroundActivityToken(); 157 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data for several origins", this);158 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data for several origins", this); 158 159 159 160 m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [this, token, completionHandler, sessionID] { 160 161 completionHandler(); 161 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data for several origins", this);162 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data for several origins", this); 162 163 }); 163 164 … … 402 403 { 403 404 if (!isHoldingLockedFiles) { 404 RELEASE_LOG( "UIProcess is releasing a background assertion because the Network process is no longer holding locked files");405 RELEASE_LOG(ProcessSuspension, "UIProcess is releasing a background assertion because the Network process is no longer holding locked files"); 405 406 m_tokenForHoldingLockedFiles = nullptr; 406 407 return; 407 408 } 408 409 if (!m_tokenForHoldingLockedFiles) { 409 RELEASE_LOG( "UIProcess is taking a background assertion because the Network process is holding locked files");410 RELEASE_LOG(ProcessSuspension, "UIProcess is taking a background assertion because the Network process is holding locked files"); 410 411 m_tokenForHoldingLockedFiles = m_throttler.backgroundActivityToken(); 411 412 } -
trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp
r204472 r205275 27 27 #include "ProcessThrottler.h" 28 28 29 #include "Logging.h" 29 30 #include "ProcessThrottlerClient.h" 30 31 … … 58 59 if (m_assertion) { 59 60 if (m_assertion->state() != assertionState()) 60 RELEASE_LOG( "%p - ProcessThrottler::updateAssertionNow() updating process assertion state to %u (foregroundActivities: %lu, backgroundActivities: %lu)", this, assertionState(), m_foregroundCounter.value(), m_backgroundCounter.value());61 RELEASE_LOG(ProcessSuspension, "%p - ProcessThrottler::updateAssertionNow() updating process assertion state to %u (foregroundActivities: %lu, backgroundActivities: %lu)", this, assertionState(), m_foregroundCounter.value(), m_backgroundCounter.value()); 61 62 m_assertion->setState(assertionState()); 62 63 m_process.didSetAssertionState(assertionState()); … … 71 72 if (m_assertion && m_assertion->state() != AssertionState::Suspended && !m_foregroundCounter.value() && !m_backgroundCounter.value()) { 72 73 ++m_suspendMessageCount; 73 RELEASE_LOG( "%p - ProcessThrottler::updateAssertion() sending PrepareToSuspend IPC", this);74 RELEASE_LOG(ProcessSuspension, "%p - ProcessThrottler::updateAssertion() sending PrepareToSuspend IPC", this); 74 75 m_process.sendPrepareToSuspend(); 75 76 m_suspendTimer.startOneShot(processSuspensionTimeout); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r205137 r205275 180 180 #define MESSAGE_CHECK_URL(url) MESSAGE_CHECK_BASE(m_process->checkURLReceivedFromWebProcess(url), m_process->connection()) 181 181 182 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)182 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), ProcessSuspension, __VA_ARGS__) 183 183 184 184 using namespace WebCore; -
trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp
r205266 r205275 214 214 addLanguageChangeObserver(this, languageChanged); 215 215 216 #if !LOG_DISABLED 216 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 217 217 WebCore::initializeLogChannelsIfNecessary(); 218 218 WebKit::initializeLogChannelsIfNecessary(); 219 #endif // !LOG_DISABLED 219 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED 220 220 221 221 #ifndef NDEBUG -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r205213 r205275 33 33 #include "DataReference.h" 34 34 #include "DownloadProxyMap.h" 35 #include "Logging.h" 35 36 #include "PluginInfoStore.h" 36 37 #include "PluginProcessManager.h" … … 710 711 711 712 auto token = throttler().backgroundActivityToken(); 712 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is fetching Website data", this);713 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - WebProcessProxy is taking a background assertion because the Web process is fetching Website data", this); 713 714 714 715 connection()->sendWithReply(Messages::WebProcess::FetchWebsiteData(sessionID, dataTypes), 0, RunLoop::main(), [this, token, completionHandler = WTFMove(completionHandler), sessionID](auto reply) { … … 719 720 720 721 completionHandler(WTFMove(std::get<0>(*reply))); 721 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done fetching Website data", this);722 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - WebProcessProxy is releasing a background assertion because the Web process is done fetching Website data", this); 722 723 }); 723 724 } … … 728 729 729 730 auto token = throttler().backgroundActivityToken(); 730 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data", this);731 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data", this); 731 732 732 733 connection()->sendWithReply(Messages::WebProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince), 0, RunLoop::main(), [this, token, completionHandler = WTFMove(completionHandler), sessionID](auto reply) { 733 734 completionHandler(); 734 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data", this);735 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data", this); 735 736 }); 736 737 } … … 741 742 742 743 auto token = throttler().backgroundActivityToken(); 743 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data for several origins", this);744 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data for several origins", this); 744 745 745 746 Vector<SecurityOriginData> originData; … … 749 750 connection()->sendWithReply(Messages::WebProcess::DeleteWebsiteDataForOrigins(sessionID, dataTypes, originData), 0, RunLoop::main(), [this, token, completionHandler = WTFMove(completionHandler), sessionID](auto reply) { 750 751 completionHandler(); 751 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data for several origins", this);752 RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data for several origins", this); 752 753 }); 753 754 } … … 946 947 switch (state) { 947 948 case AssertionState::Suspended: 948 RELEASE_LOG( "%p - WebProcessProxy::didSetAssertionState(Suspended) release all assertions for network process", this);949 RELEASE_LOG(ProcessSuspension, "%p - WebProcessProxy::didSetAssertionState(Suspended) release all assertions for network process", this); 949 950 m_foregroundTokenForNetworkProcess = nullptr; 950 951 m_backgroundTokenForNetworkProcess = nullptr; … … 954 955 955 956 case AssertionState::Background: 956 RELEASE_LOG( "%p - WebProcessProxy::didSetAssertionState(Background) taking background assertion for network process", this);957 RELEASE_LOG(ProcessSuspension, "%p - WebProcessProxy::didSetAssertionState(Background) taking background assertion for network process", this); 957 958 m_backgroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().backgroundActivityToken(); 958 959 m_foregroundTokenForNetworkProcess = nullptr; … … 960 961 961 962 case AssertionState::Foreground: 962 RELEASE_LOG( "%p - WebProcessProxy::didSetAssertionState(Foreground) taking foreground assertion for network process", this);963 RELEASE_LOG(ProcessSuspension, "%p - WebProcessProxy::didSetAssertionState(Foreground) taking foreground assertion for network process", this); 963 964 m_foregroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().foregroundActivityToken(); 964 965 m_backgroundTokenForNetworkProcess = nullptr; … … 977 978 { 978 979 if (!isHoldingLockedFiles) { 979 RELEASE_LOG( "UIProcess is releasing a background assertion because the WebContent process is no longer holding locked files");980 RELEASE_LOG(ProcessSuspension, "UIProcess is releasing a background assertion because the WebContent process is no longer holding locked files"); 980 981 m_tokenForHoldingLockedFiles = nullptr; 981 982 return; 982 983 } 983 984 if (!m_tokenForHoldingLockedFiles) { 984 RELEASE_LOG( "UIProcess is taking a background assertion because the WebContent process is holding locked files");985 RELEASE_LOG(ProcessSuspension, "UIProcess is taking a background assertion because the WebContent process is holding locked files"); 985 986 m_tokenForHoldingLockedFiles = m_throttler.backgroundActivityToken(); 986 987 } -
trunk/Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm
r204472 r205275 30 30 31 31 #import "AssertionServicesSPI.h" 32 #import "Logging.h" 32 33 #import <UIKit/UIApplication.h> 33 34 #import <wtf/HashSet.h> … … 106 107 if (_needsToRunInBackgroundCount && _backgroundTask == UIBackgroundTaskInvalid) { 107 108 _backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithName:@"com.apple.WebKit.ProcessAssertion" expirationHandler:^{ 108 RELEASE_LOG_ERROR( "Background task expired while holding WebKit ProcessAssertion (isMainThread? %d).", RunLoop::isMain());109 RELEASE_LOG_ERROR(ProcessSuspension, "Background task expired while holding WebKit ProcessAssertion (isMainThread? %d).", RunLoop::isMain()); 109 110 // The expiration handler gets called on a non-main thread when the underlying assertion could not be taken (rdar://problem/27278419). 110 111 if (RunLoop::isMain()) … … 166 167 BKSProcessAssertionAcquisitionHandler handler = ^(BOOL acquired) { 167 168 if (!acquired) { 168 RELEASE_LOG_ERROR( "Unable to acquire assertion for process %d", pid);169 RELEASE_LOG_ERROR(ProcessSuspension, "Unable to acquire assertion for process %d", pid); 169 170 ASSERT_NOT_REACHED(); 170 171 dispatch_async(dispatch_get_main_queue(), ^{ -
trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp
r205269 r205275 58 58 using namespace WebCore; 59 59 60 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), __VA_ARGS__)61 #define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), __VA_ARGS__)60 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__) 61 #define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__) 62 62 63 63 namespace WebKit { -
trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp
r204472 r205275 43 43 using namespace WebCore; 44 44 45 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)45 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__) 46 46 47 47 namespace WebKit { -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r204996 r205275 256 256 static const std::chrono::seconds maximumLayerVolatilityTimerInterval { 2 }; 257 257 258 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)259 #define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)258 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Layers, __VA_ARGS__) 259 #define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), Layers, __VA_ARGS__) 260 260 261 261 class SendStopResponsivenessTimer { … … 2065 2065 if (didSucceed || newInterval > maximumLayerVolatilityTimerInterval) { 2066 2066 m_layerVolatilityTimer.stop(); 2067 RELEASE_LOG_IF_ALLOWED("%p - WebPage - Attempted to mark surfaces as volatile, success? %d", this, didSucceed);2067 RELEASE_LOG_IF_ALLOWED("%p - WebPage - Attempted to mark layers as volatile, success? %d", this, didSucceed); 2068 2068 callVolatilityCompletionHandlers(); 2069 2069 return; -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r205266 r205275 1273 1273 1274 1274 markAllLayersVolatile([this, shouldAcknowledgeWhenReadyToSuspend] { 1275 RELEASE_LOG( "%p - WebProcess::markAllLayersVolatile() Successfuly marked all layers as volatile", this);1275 RELEASE_LOG(ProcessSuspension, "%p - WebProcess::markAllLayersVolatile() Successfuly marked all layers as volatile", this); 1276 1276 1277 1277 if (shouldAcknowledgeWhenReadyToSuspend == ShouldAcknowledgeWhenReadyToSuspend::Yes) { 1278 RELEASE_LOG( "%p - WebProcess::actualPrepareToSuspend() Sending ProcessReadyToSuspend IPC message", this);1278 RELEASE_LOG(ProcessSuspension, "%p - WebProcess::actualPrepareToSuspend() Sending ProcessReadyToSuspend IPC message", this); 1279 1279 parentProcessConnection()->send(Messages::WebProcessProxy::ProcessReadyToSuspend(), 0); 1280 1280 } … … 1292 1292 } 1293 1293 1294 RELEASE_LOG( "%p - WebProcess::processWillSuspendImminently()", this);1294 RELEASE_LOG(ProcessSuspension, "%p - WebProcess::processWillSuspendImminently()", this); 1295 1295 DatabaseTracker::tracker().closeAllDatabases(CurrentQueryBehavior::Interrupt); 1296 1296 actualPrepareToSuspend(ShouldAcknowledgeWhenReadyToSuspend::No); … … 1300 1300 void WebProcess::prepareToSuspend() 1301 1301 { 1302 RELEASE_LOG( "%p - WebProcess::prepareToSuspend()", this);1302 RELEASE_LOG(ProcessSuspension, "%p - WebProcess::prepareToSuspend()", this); 1303 1303 actualPrepareToSuspend(ShouldAcknowledgeWhenReadyToSuspend::Yes); 1304 1304 } … … 1306 1306 void WebProcess::cancelPrepareToSuspend() 1307 1307 { 1308 RELEASE_LOG( "%p - WebProcess::cancelPrepareToSuspend()", this);1308 RELEASE_LOG(ProcessSuspension, "%p - WebProcess::cancelPrepareToSuspend()", this); 1309 1309 setAllLayerTreeStatesFrozen(false); 1310 1310 … … 1316 1316 cancelMarkAllLayersVolatile(); 1317 1317 1318 RELEASE_LOG( "%p - WebProcess::cancelPrepareToSuspend() Sending DidCancelProcessSuspension IPC message", this);1318 RELEASE_LOG(ProcessSuspension, "%p - WebProcess::cancelPrepareToSuspend() Sending DidCancelProcessSuspension IPC message", this); 1319 1319 parentProcessConnection()->send(Messages::WebProcessProxy::DidCancelProcessSuspension(), 0); 1320 1320 } … … 1322 1322 void WebProcess::markAllLayersVolatile(std::function<void()> completionHandler) 1323 1323 { 1324 RELEASE_LOG( "%p - WebProcess::markAllLayersVolatile()", this);1324 RELEASE_LOG(ProcessSuspension, "%p - WebProcess::markAllLayersVolatile()", this); 1325 1325 m_pagesMarkingLayersAsVolatile = m_pageMap.size(); 1326 1326 if (!m_pagesMarkingLayersAsVolatile) { … … 1355 1355 void WebProcess::processDidResume() 1356 1356 { 1357 RELEASE_LOG( "%p - WebProcess::processDidResume()", this);1357 RELEASE_LOG(ProcessSuspension, "%p - WebProcess::processDidResume()", this); 1358 1358 1359 1359 cancelMarkAllLayersVolatile();
Note: See TracChangeset
for help on using the changeset viewer.