Diff
Modified: trunk/Source/WTF/ChangeLog (205274 => 205275)
--- trunk/Source/WTF/ChangeLog 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WTF/ChangeLog 2016-09-01 01:33:40 UTC (rev 205275)
@@ -1,3 +1,29 @@
+2016-08-31 Keith Rollin <[email protected]>
+
+ WebKit should set a subsystem for os_log so it's easier to filter for WebKit log messages
+ https://bugs.webkit.org/show_bug.cgi?id=160969
+ <rdar://problem/26068734>
+
+ Reviewed by Simon Fraser.
+
+ Add support for attaching a subsystem and category when logging via
+ the RELEASE_LOG macros. This support is provided by adding subsystem
+ and category information to WTFLogChannel. An os_log_t object is then
+ created to enacpsulate that information. When using RELEASE_LOG to log
+ through that channel, the associated log object is used when calling
+ os_log.
+
+ To help support the inclusion of the subsystem and category
+ information in WTFLogChannel, the DECLARE_LOG_CHANNEL,
+ DEFINE_LOG_CHANNEL, and LOG_CHANNEL_ADDRESS macros that were defined
+ in various modules are consolidated and moved to Assertions.h.
+ DEFINE_LOG_CHANNEL is now defined to initialize the subsystem and
+ category.
+
+ * wtf/Assertions.cpp:
+ * wtf/Assertions.h:
+ * wtf/RefCountedLeakCounter.cpp:
+
2016-08-31 Alex Christensen <[email protected]>
Implement IPv6 parsing in URLParser
Modified: trunk/Source/WTF/wtf/Assertions.cpp (205274 => 205275)
--- trunk/Source/WTF/wtf/Assertions.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WTF/wtf/Assertions.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -555,6 +555,13 @@
void WTFInitializeLogChannelStatesFromString(WTFLogChannel* channels[], size_t count, const char* logLevel)
{
+#if !RELEASE_LOG_DISABLED
+ for (size_t i = 0; i < count; ++i) {
+ WTFLogChannel* channel = channels[i];
+ channel->osLogChannel = os_log_create(channel->subsystem, channel->name);
+ }
+#endif
+
String logLevelString = logLevel;
Vector<String> components;
logLevelString.split(',', components);
Modified: trunk/Source/WTF/wtf/Assertions.h (205274 => 205275)
--- trunk/Source/WTF/wtf/Assertions.h 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WTF/wtf/Assertions.h 2016-09-01 01:33:40 UTC (rev 205275)
@@ -135,8 +135,32 @@
typedef struct {
WTFLogChannelState state;
const char* name;
+#if !RELEASE_LOG_DISABLED
+ const char* subsystem;
+ __unsafe_unretained os_log_t osLogChannel;
+#endif
} WTFLogChannel;
+#define LOG_CHANNEL(name) JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name)
+#define LOG_CHANNEL_ADDRESS(name) &LOG_CHANNEL(name),
+#define JOIN_LOG_CHANNEL_WITH_PREFIX(prefix, channel) JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel)
+#define JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel) prefix ## channel
+
+#define LOG_CHANNEL_WEBKIT_SUBSYSTEM "com.apple.WebKit"
+
+#define DECLARE_LOG_CHANNEL(name) \
+ extern WTFLogChannel LOG_CHANNEL(name);
+
+#if !defined(DEFINE_LOG_CHANNEL)
+#if RELEASE_LOG_DISABLED
+#define DEFINE_LOG_CHANNEL(name, subsystem) \
+ WTFLogChannel LOG_CHANNEL(name) = { WTFLogChannelOff, #name };
+#else
+#define DEFINE_LOG_CHANNEL(name, subsystem) \
+ WTFLogChannel LOG_CHANNEL(name) = { WTFLogChannelOff, #name, subsystem, OS_LOG_DEFAULT };
+#endif
+#endif
+
WTF_EXPORT_PRIVATE void WTFReportAssertionFailure(const char* file, int line, const char* function, const char* assertion);
WTF_EXPORT_PRIVATE void WTFReportAssertionFailureWithMessage(const char* file, int line, const char* function, const char* assertion, const char* format, ...) WTF_ATTRIBUTE_PRINTF(5, 6);
WTF_EXPORT_PRIVATE void WTFReportArgumentAssertionFailure(const char* file, int line, const char* function, const char* argName, const char* assertion);
@@ -367,9 +391,7 @@
#if LOG_DISABLED
#define LOG(channel, ...) ((void)0)
#else
-#define LOG(channel, ...) WTFLog(&JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__)
-#define JOIN_LOG_CHANNEL_WITH_PREFIX(prefix, channel) JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel)
-#define JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel) prefix ## channel
+#define LOG(channel, ...) WTFLog(&LOG_CHANNEL(channel), __VA_ARGS__)
#endif
/* LOG_VERBOSE */
@@ -377,23 +399,26 @@
#if LOG_DISABLED
#define LOG_VERBOSE(channel, ...) ((void)0)
#else
-#define LOG_VERBOSE(channel, ...) WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__)
+#define LOG_VERBOSE(channel, ...) WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, &LOG_CHANNEL(channel), __VA_ARGS__)
#endif
/* RELEASE_LOG */
-#define WTF_LOGGING_PREFIX "#WK: "
#if RELEASE_LOG_DISABLED
-#define RELEASE_LOG(format, ...) ((void)0)
-#define RELEASE_LOG_ERROR(format, ...) WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, format, ##__VA_ARGS__)
+#define RELEASE_LOG( channel, format, ...) ((void)0)
+#define RELEASE_LOG_ERROR(channel, format, ...) LOG_ERROR(format, ##__VA_ARGS__)
+
+#define RELEASE_LOG_IF( isAllowed, channel, format, ...) ((void)0)
+#define RELEASE_LOG_ERROR_IF(isAllowed, channel, format, ...) do { if (isAllowed) RELEASE_LOG_ERROR(channel, format, ##__VA_ARGS__); } while (0)
#else
-#define WTF_LOG_DEFAULT OS_LOG_DEFAULT
-#define RELEASE_LOG(format, ...) os_log(WTF_LOG_DEFAULT, WTF_LOGGING_PREFIX format, ##__VA_ARGS__)
-#define RELEASE_LOG_ERROR(format, ...) os_log_error(WTF_LOG_DEFAULT, WTF_LOGGING_PREFIX format, ##__VA_ARGS__)
+#define RELEASE_LOG( channel, format, ...) os_log( LOG_CHANNEL(channel).osLogChannel, format, ##__VA_ARGS__)
+#define RELEASE_LOG_ERROR(channel, format, ...) os_log_error(LOG_CHANNEL(channel).osLogChannel, format, ##__VA_ARGS__)
+
+#define RELEASE_LOG_IF( isAllowed, channel, format, ...) do { if (isAllowed) RELEASE_LOG( channel, format, ##__VA_ARGS__); } while (0)
+#define RELEASE_LOG_ERROR_IF(isAllowed, channel, format, ...) do { if (isAllowed) RELEASE_LOG_ERROR(channel, format, ##__VA_ARGS__); } while (0)
#endif
-#define RELEASE_LOG_IF(isAllowed, format, ...) do { if (isAllowed) RELEASE_LOG(format, ##__VA_ARGS__); } while (0)
-#define RELEASE_LOG_ERROR_IF(isAllowed, format, ...) do { if (isAllowed) RELEASE_LOG_ERROR(format, ##__VA_ARGS__); } while (0)
+
/* RELEASE_ASSERT */
#if ASSERT_DISABLED
Modified: trunk/Source/WTF/wtf/RefCountedLeakCounter.cpp (205274 => 205275)
--- trunk/Source/WTF/wtf/RefCountedLeakCounter.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WTF/wtf/RefCountedLeakCounter.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -39,7 +39,11 @@
#else
#define LOG_CHANNEL_PREFIX Log
+#if RELEASE_LOG_DISABLED
static WTFLogChannel LogRefCountedLeaks = { WTFLogChannelOn, "RefCountedLeaks" };
+#else
+static WTFLogChannel LogRefCountedLeaks = { WTFLogChannelOn, "RefCountedLeaks", LOG_CHANNEL_WEBKIT_SUBSYSTEM, OS_LOG_DEFAULT };
+#endif
typedef HashCountedSet<const char*, PtrHash<const char*>> ReasonSet;
static ReasonSet* leakMessageSuppressionReasons;
Modified: trunk/Source/WebCore/ChangeLog (205274 => 205275)
--- trunk/Source/WebCore/ChangeLog 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/ChangeLog 2016-09-01 01:33:40 UTC (rev 205275)
@@ -1,3 +1,38 @@
+2016-08-31 Keith Rollin <[email protected]>
+
+ WebKit should set a subsystem for os_log so it's easier to filter for WebKit log messages
+ https://bugs.webkit.org/show_bug.cgi?id=160969
+ <rdar://problem/26068734>
+
+ Reviewed by Simon Fraser.
+
+ - Specify a channel when using RELEASE_LOG macros
+ - Add a new channel so that we have something to pass to the
+ RELEASE_LOG macros (Layers).
+ - Enable subsystem- and channel-related data and functions when using
+ RELEASE_LOG macros.
+ - Use the DECLARE_LOG_CHANNEL, DEFINE_LOG_CHANNEL, and
+ LOG_CHANNEL_ADDRESS macros that are now defined in WTF.
+
+ No new tests. There are no tests for logging.
+
+ * loader/FrameLoader.cpp:
+ * platform/LogInitialization.h:
+ * platform/LogMacros.h:
+ * platform/Logging.cpp:
+ * platform/Logging.h:
+ * platform/MemoryPressureHandler.cpp:
+ (WebCore::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange):
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::drawNativeImage):
+ * platform/graphics/cocoa/IOSurface.mm:
+ (WebCore::IOSurface::IOSurface):
+ * platform/mac/LoggingMac.mm:
+ * platform/unix/LoggingUnix.cpp:
+ * platform/win/LoggingWin.cpp:
+ * testing/js/WebCoreTestSupport.cpp:
+ (WebCoreTestSupport::initializeLogChannelsIfNecessary):
+
2016-08-31 Ricky Mondello <[email protected]>
Enable the YouTube Flash plug-in replacement behavior on all Cocoa ports
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (205274 => 205275)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -142,7 +142,7 @@
#include "WKContentObservation.h"
#endif
-#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__)
namespace WebCore {
Modified: trunk/Source/WebCore/platform/LogInitialization.h (205274 => 205275)
--- trunk/Source/WebCore/platform/LogInitialization.h 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/platform/LogInitialization.h 2016-09-01 01:33:40 UTC (rev 205275)
@@ -30,7 +30,7 @@
namespace WebCore {
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
String logLevelString();
bool isLogChannelEnabled(const String& name);
@@ -37,6 +37,6 @@
WEBCORE_EXPORT void setLogChannelToAccumulate(const String& name);
WEBCORE_EXPORT void initializeLogChannelsIfNecessary();
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/LogMacros.h (205274 => 205275)
--- trunk/Source/WebCore/platform/LogMacros.h 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/platform/LogMacros.h 2016-09-01 01:33:40 UTC (rev 205275)
@@ -27,7 +27,7 @@
#include <functional>
-#if LOG_DISABLED
+#if LOG_DISABLED && RELEASE_LOG_DISABLED
#define LOG_RESULT(channel, function) ((void)0)
#define LOG_WITH_STREAM(channel, commands) ((void)0)
@@ -47,4 +47,4 @@
return stream.release().utf8().data(); \
});
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
Modified: trunk/Source/WebCore/platform/Logging.cpp (205274 => 205275)
--- trunk/Source/WebCore/platform/Logging.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/platform/Logging.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -35,20 +35,18 @@
#include <notify.h>
#endif
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
namespace WebCore {
-#define DEFINE_LOG_CHANNEL(name) \
- WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name) = { WTFLogChannelOff, #name };
-WEBCORE_LOG_CHANNELS(DEFINE_LOG_CHANNEL)
+#define DEFINE_WEBCORE_LOG_CHANNEL(name) DEFINE_LOG_CHANNEL(name, LOG_CHANNEL_WEBKIT_SUBSYSTEM)
+WEBCORE_LOG_CHANNELS(DEFINE_WEBCORE_LOG_CHANNEL)
-#define LOG_CHANNEL_ADDRESS(name) &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name),
-WTFLogChannel* logChannels[] = {
+static WTFLogChannel* logChannels[] = {
WEBCORE_LOG_CHANNELS(LOG_CHANNEL_ADDRESS)
};
-size_t logChannelCount = WTF_ARRAY_LENGTH(logChannels);
+static const size_t logChannelCount = WTF_ARRAY_LENGTH(logChannels);
bool isLogChannelEnabled(const String& name)
{
@@ -102,4 +100,4 @@
} // namespace WebCore
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
Modified: trunk/Source/WebCore/platform/Logging.h (205274 => 205275)
--- trunk/Source/WebCore/platform/Logging.h 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/platform/Logging.h 2016-09-01 01:33:40 UTC (rev 205275)
@@ -31,7 +31,7 @@
namespace WebCore {
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
#ifndef LOG_CHANNEL_PREFIX
#define LOG_CHANNEL_PREFIX Log
@@ -46,9 +46,9 @@
M(DOMTimers) \
M(Editing) \
M(Events) \
- M(FTP) \
M(FileAPI) \
M(Frames) \
+ M(FTP) \
M(Fullscreen) \
M(Gamepad) \
M(History) \
@@ -55,6 +55,7 @@
M(IconDatabase) \
M(Images) \
M(IndexedDB) \
+ M(Layers) \
M(Layout) \
M(Loading) \
M(Media) \
@@ -70,12 +71,13 @@
M(Progress) \
M(RemoteInspector) \
M(ResourceLoading) \
- M(SQLDatabase) \
- M(SVG) \
+ M(ResourceLoadObserver) \
+ M(Scrolling) \
M(Services) \
- M(Scrolling) \
M(SpellingAndGrammar) \
+ M(SQLDatabase) \
M(StorageAPI) \
+ M(SVG) \
M(TextAutosizing) \
M(Threading) \
M(URLParser) \
@@ -83,8 +85,8 @@
M(WebGL) \
M(WebReplay) \
M(WheelEventTestTriggers) \
- M(ResourceLoadObserver) \
+#undef DECLARE_LOG_CHANNEL
#define DECLARE_LOG_CHANNEL(name) \
WEBCORE_EXPORT extern WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name);
@@ -97,6 +99,6 @@
void registerNotifyCallback(const String& notifyID, std::function<void()> callback);
#endif
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/MemoryPressureHandler.cpp (205274 => 205275)
--- trunk/Source/WebCore/platform/MemoryPressureHandler.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/platform/MemoryPressureHandler.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -34,6 +34,7 @@
#include "GCController.h"
#include "HTMLMediaElement.h"
#include "InspectorInstrumentation.h"
+#include "Logging.h"
#include "MemoryCache.h"
#include "Page.h"
#include "PageCache.h"
@@ -220,7 +221,7 @@
{
#if !RELEASE_LOG_DISABLED
#define STRING_SPECIFICATION "%{public}s"
-#define MEMORYPRESSURE_LOG(...) RELEASE_LOG(__VA_ARGS__)
+#define MEMORYPRESSURE_LOG(...) RELEASE_LOG(MemoryPressure, __VA_ARGS__)
#else
#define STRING_SPECIFICATION "%s"
#define MEMORYPRESSURE_LOG(...) WTFLogAlways(__VA_ARGS__)
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (205274 => 205275)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -175,7 +175,7 @@
return;
}
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
double startTime = currentTime();
#endif
RetainPtr<CGImageRef> subImage(image);
Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm (205274 => 205275)
--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm 2016-09-01 01:33:40 UTC (rev 205275)
@@ -34,6 +34,7 @@
#import "IOSurfaceSPI.h"
#import "ImageBuffer.h"
#import "ImageBufferDataCG.h"
+#import "Logging.h"
#import "MachSendRight.h"
#import <wtf/Assertions.h>
#import <wtf/MathExtras.h>
@@ -211,7 +212,7 @@
if (success)
m_totalBytes = IOSurfaceGetAllocSize(m_surface.get());
else
- RELEASE_LOG_ERROR("Surface creation failed for size: (%d %d) and format: (%d)", size.width(), size.height(), format);
+ RELEASE_LOG_ERROR(Layers, "Surface creation failed for size: (%d %d) and format: (%d)", size.width(), size.height(), format);
}
WebCore::IOSurface::IOSurface(IOSurfaceRef surface, CGColorSpaceRef colorSpace)
Modified: trunk/Source/WebCore/platform/mac/LoggingMac.mm (205274 => 205275)
--- trunk/Source/WebCore/platform/mac/LoggingMac.mm 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/platform/mac/LoggingMac.mm 2016-09-01 01:33:40 UTC (rev 205275)
@@ -28,7 +28,7 @@
#include <wtf/text/WTFString.h>
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
namespace WebCore {
@@ -41,4 +41,4 @@
}
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
Modified: trunk/Source/WebCore/platform/unix/LoggingUnix.cpp (205274 => 205275)
--- trunk/Source/WebCore/platform/unix/LoggingUnix.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/platform/unix/LoggingUnix.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -22,7 +22,7 @@
#include "config.h"
#include "Logging.h"
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
#include <string.h>
#include <wtf/text/WTFString.h>
@@ -46,4 +46,4 @@
} // namespace WebCore
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
Modified: trunk/Source/WebCore/platform/win/LoggingWin.cpp (205274 => 205275)
--- trunk/Source/WebCore/platform/win/LoggingWin.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/platform/win/LoggingWin.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -26,7 +26,7 @@
#include "config.h"
#include "Logging.h"
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
#include <windows.h>
#include <wtf/StdLibExtras.h>
@@ -52,4 +52,4 @@
} // namespace WebCore
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
Modified: trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp (205274 => 205275)
--- trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -110,7 +110,7 @@
void initializeLogChannelsIfNecessary()
{
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
WebCore::initializeLogChannelsIfNecessary();
#endif
}
Modified: trunk/Source/WebKit/mac/ChangeLog (205274 => 205275)
--- trunk/Source/WebKit/mac/ChangeLog 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit/mac/ChangeLog 2016-09-01 01:33:40 UTC (rev 205275)
@@ -1,3 +1,20 @@
+2016-08-31 Keith Rollin <[email protected]>
+
+ WebKit should set a subsystem for os_log so it's easier to filter for WebKit log messages
+ https://bugs.webkit.org/show_bug.cgi?id=160969
+ <rdar://problem/26068734>
+
+ Reviewed by Simon Fraser.
+
+ Enable subsystem- and channel-related data and functions when using
+ RELEASE_LOG macros. Use the DECLARE_LOG_CHANNEL, DEFINE_LOG_CHANNEL,
+ and LOG_CHANNEL_ADDRESS macros that are now defined in WTF.
+
+ * Misc/WebKitLogging.h:
+ * Misc/WebKitLogging.m:
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+
2016-08-31 Brady Eidson <[email protected]>
WK2 Gamepad provider on iOS.
Modified: trunk/Source/WebKit/mac/Misc/WebKitLogging.h (205274 => 205275)
--- trunk/Source/WebKit/mac/Misc/WebKitLogging.h 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit/mac/Misc/WebKitLogging.h 2016-09-01 01:33:40 UTC (rev 205275)
@@ -36,7 +36,7 @@
extern "C" {
#endif
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
#define WEBKIT_LOG_CHANNELS(M) \
M(BackForward) \
@@ -64,15 +64,12 @@
M(Timing) \
M(View) \
-#define DECLARE_LOG_CHANNEL(name) \
-extern WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name);
-
WEBKIT_LOG_CHANNELS(DECLARE_LOG_CHANNEL)
#undef DECLARE_LOG_CHANNEL
void WebKitInitializeLogChannelsIfNecessary(void);
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
void ReportDiscardedDelegateException(SEL delegateSelector, id exception);
Modified: trunk/Source/WebKit/mac/Misc/WebKitLogging.m (205274 => 205275)
--- trunk/Source/WebKit/mac/Misc/WebKitLogging.m 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit/mac/Misc/WebKitLogging.m 2016-09-01 01:33:40 UTC (rev 205275)
@@ -28,13 +28,11 @@
#import "WebKitLogging.h"
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-#define DEFINE_LOG_CHANNEL(name) \
- WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name) = { WTFLogChannelOff, #name };
-WEBKIT_LOG_CHANNELS(DEFINE_LOG_CHANNEL)
+#define DEFINE_WEBKIT_LOG_CHANNEL(name) DEFINE_LOG_CHANNEL(name, LOG_CHANNEL_WEBKIT_SUBSYSTEM)
+WEBKIT_LOG_CHANNELS(DEFINE_WEBKIT_LOG_CHANNEL)
-#define LOG_CHANNEL_ADDRESS(name) &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name),
static WTFLogChannel* logChannels[] = {
WEBKIT_LOG_CHANNELS(LOG_CHANNEL_ADDRESS)
};
@@ -58,7 +56,7 @@
WTFInitializeLogChannelStatesFromString(logChannels, logChannelCount, [logLevel UTF8String]);
}
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
void ReportDiscardedDelegateException(SEL delegateSelector, id exception)
{
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (205274 => 205275)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2016-09-01 01:33:40 UTC (rev 205275)
@@ -967,7 +967,7 @@
static bool didOneTimeInitialization = false;
#endif
if (!didOneTimeInitialization) {
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
WebKitInitializeLogChannelsIfNecessary();
WebCore::initializeLogChannelsIfNecessary();
#endif
Modified: trunk/Source/WebKit/win/ChangeLog (205274 => 205275)
--- trunk/Source/WebKit/win/ChangeLog 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit/win/ChangeLog 2016-09-01 01:33:40 UTC (rev 205275)
@@ -1,3 +1,20 @@
+2016-08-31 Keith Rollin <[email protected]>
+
+ WebKit should set a subsystem for os_log so it's easier to filter for WebKit log messages
+ https://bugs.webkit.org/show_bug.cgi?id=160969
+ <rdar://problem/26068734>
+
+ Reviewed by Simon Fraser.
+
+ Enable subsystem- and channel-related data and functions when using
+ RELEASE_LOG macros. Use the DECLARE_LOG_CHANNEL, DEFINE_LOG_CHANNEL,
+ and LOG_CHANNEL_ADDRESS macros that are now defined in WTF.
+
+ * WebKitLogging.cpp:
+ * WebKitLogging.h:
+ * WebView.cpp:
+ (WebView::initWithFrame):
+
2016-08-16 Carlos Garcia Campos <[email protected]>
[GTK] Accelerated compositing does not work in Wayland
Modified: trunk/Source/WebKit/win/WebKitLogging.cpp (205274 => 205275)
--- trunk/Source/WebKit/win/WebKitLogging.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit/win/WebKitLogging.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -27,13 +27,11 @@
*/
#include "WebKitLogging.h"
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-#define DEFINE_LOG_CHANNEL(name) \
- WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name) = { WTFLogChannelOff, #name };
-WEBKIT_LOG_CHANNELS(DEFINE_LOG_CHANNEL)
+#define DEFINE_WEBKIT_LOG_CHANNEL(name) DEFINE_LOG_CHANNEL(name, LOG_CHANNEL_WEBKIT_SUBSYSTEM)
+WEBKIT_LOG_CHANNELS(DEFINE_WEBKIT_LOG_CHANNEL)
-#define LOG_CHANNEL_ADDRESS(name) &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name),
static WTFLogChannel* logChannels[] = {
WEBKIT_LOG_CHANNELS(LOG_CHANNEL_ADDRESS)
};
@@ -51,4 +49,4 @@
WTFInitializeLogChannelStatesFromString(logChannels, logChannelCount, "");
}
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
Modified: trunk/Source/WebKit/win/WebKitLogging.h (205274 => 205275)
--- trunk/Source/WebKit/win/WebKitLogging.h 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit/win/WebKitLogging.h 2016-09-01 01:33:40 UTC (rev 205275)
@@ -30,7 +30,7 @@
#include <wtf/Assertions.h>
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
#ifndef LOG_CHANNEL_PREFIX
#define LOG_CHANNEL_PREFIX WebKitLog
@@ -62,9 +62,6 @@
M(Timing) \
M(View) \
-#define DECLARE_LOG_CHANNEL(name) \
-extern WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name);
-
WEBKIT_LOG_CHANNELS(DECLARE_LOG_CHANNEL)
#undef DECLARE_LOG_CHANNEL
@@ -71,6 +68,6 @@
void WebKitInitializeLogChannelsIfNecessary(void);
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
#endif
Modified: trunk/Source/WebKit/win/WebView.cpp (205274 => 205275)
--- trunk/Source/WebKit/win/WebView.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit/win/WebView.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -2906,9 +2906,9 @@
static bool didOneTimeInitialization;
if (!didOneTimeInitialization) {
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
initializeLogChannelsIfNecessary();
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
// Initialize our platform strategies first before invoking the rest
// of the initialization code which may depend on the strategies.
Modified: trunk/Source/WebKit2/ChangeLog (205274 => 205275)
--- trunk/Source/WebKit2/ChangeLog 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/ChangeLog 2016-09-01 01:33:40 UTC (rev 205275)
@@ -1,3 +1,72 @@
+2016-08-31 Keith Rollin <[email protected]>
+
+ WebKit should set a subsystem for os_log so it's easier to filter for WebKit log messages
+ https://bugs.webkit.org/show_bug.cgi?id=160969
+ <rdar://problem/26068734>
+
+ Reviewed by Simon Fraser.
+
+ - Specify a channel when using RELEASE_LOG macros.
+ - Add some new channels so that we have something to pass to the
+ RELEASE_LOG macros (ProcessSuspension, IPC, Layers).
+ - Enable subsystem- and channel-related data and functions when using
+ RELEASE_LOG macros.
+ - Use the DECLARE_LOG_CHANNEL, DEFINE_LOG_CHANNEL, and
+ LOG_CHANNEL_ADDRESS macros that are now defined in WTF.
+
+ * NetworkProcess/Downloads/Download.cpp:
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::prepareToSuspend):
+ (WebKit::NetworkProcess::cancelPrepareToSuspend):
+ (WebKit::NetworkProcess::processDidResume):
+ * NetworkProcess/NetworkResourceLoader.cpp:
+ * Platform/IPC/Connection.cpp:
+ (IPC::Connection::waitForSyncReply):
+ * Platform/LogInitialization.h:
+ * Platform/Logging.cpp:
+ (WebKit::initializeLogChannelsIfNecessary):
+ * Platform/Logging.h:
+ * Platform/foundation/LoggingFoundation.mm:
+ * Platform/unix/LoggingUnix.cpp:
+ * Shared/ChildProcess.cpp:
+ (WebKit::didCloseOnConnectionWorkQueue):
+ * Shared/WebKit2Initialize.cpp:
+ (WebKit::InitializeWebKit2):
+ * UIProcess/Cocoa/NavigationState.mm:
+ (WebKit::NavigationState::releaseNetworkActivityToken):
+ (WebKit::NavigationState::didChangeIsLoading):
+ * UIProcess/Network/NetworkProcessProxy.cpp:
+ (WebKit::NetworkProcessProxy::fetchWebsiteData):
+ (WebKit::NetworkProcessProxy::deleteWebsiteData):
+ (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
+ (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
+ * UIProcess/ProcessThrottler.cpp:
+ (WebKit::ProcessThrottler::updateAssertionNow):
+ (WebKit::ProcessThrottler::updateAssertion):
+ * UIProcess/WebPageProxy.cpp:
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::m_hiddenPageThrottlingTimer):
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::fetchWebsiteData):
+ (WebKit::WebProcessProxy::deleteWebsiteData):
+ (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
+ (WebKit::WebProcessProxy::didSetAssertionState):
+ (WebKit::WebProcessProxy::setIsHoldingLockedFiles):
+ * UIProcess/ios/ProcessAssertionIOS.mm:
+ (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
+ (WebKit::ProcessAssertion::ProcessAssertion):
+ * WebProcess/Network/WebLoaderStrategy.cpp:
+ * WebProcess/Network/WebResourceLoader.cpp:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::layerVolatilityTimerFired):
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::actualPrepareToSuspend):
+ (WebKit::WebProcess::processWillSuspendImminently):
+ (WebKit::WebProcess::prepareToSuspend):
+ (WebKit::WebProcess::cancelPrepareToSuspend):
+ (WebKit::WebProcess::markAllLayersVolatile):
+ (WebKit::WebProcess::processDidResume):
+
2016-08-31 Yoav Weiss <[email protected]>
Add event support for link preload.
Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/Download.cpp (205274 => 205275)
--- trunk/Source/WebKit2/NetworkProcess/Downloads/Download.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/Download.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -31,6 +31,7 @@
#include "DataReference.h"
#include "DownloadManager.h"
#include "DownloadProxyMessages.h"
+#include "Logging.h"
#include "SandboxExtension.h"
#include "WebCoreArgumentCoders.h"
#include <WebCore/NotImplemented.h>
@@ -37,8 +38,8 @@
using namespace WebCore;
-#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
-#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__)
+#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__)
namespace WebKit {
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (205274 => 205275)
--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -623,10 +623,10 @@
void NetworkProcess::prepareToSuspend()
{
- RELEASE_LOG("%p - NetworkProcess::prepareToSuspend()", this);
+ RELEASE_LOG(ProcessSuspension, "%p - NetworkProcess::prepareToSuspend()", this);
lowMemoryHandler(Critical::Yes);
- RELEASE_LOG("%p - NetworkProcess::prepareToSuspend() Sending ProcessReadyToSuspend IPC message", this);
+ RELEASE_LOG(ProcessSuspension, "%p - NetworkProcess::prepareToSuspend() Sending ProcessReadyToSuspend IPC message", this);
parentProcessConnection()->send(Messages::NetworkProcessProxy::ProcessReadyToSuspend(), 0);
}
@@ -636,12 +636,12 @@
// we do not because prepareToSuspend() already replied with a NetworkProcessProxy::ProcessReadyToSuspend
// message. And NetworkProcessProxy expects to receive either a NetworkProcessProxy::ProcessReadyToSuspend-
// or NetworkProcessProxy::DidCancelProcessSuspension- message, but not both.
- RELEASE_LOG("%p - NetworkProcess::cancelPrepareToSuspend()", this);
+ RELEASE_LOG(ProcessSuspension, "%p - NetworkProcess::cancelPrepareToSuspend()", this);
}
void NetworkProcess::processDidResume()
{
- RELEASE_LOG("%p - NetworkProcess::processDidResume()", this);
+ RELEASE_LOG(ProcessSuspension, "%p - NetworkProcess::processDidResume()", this);
}
void NetworkProcess::prefetchDNS(const String& hostname)
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (205274 => 205275)
--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -49,8 +49,8 @@
using namespace WebCore;
-#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
-#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__)
+#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__)
namespace WebKit {
Modified: trunk/Source/WebKit2/Platform/IPC/Connection.cpp (205274 => 205275)
--- trunk/Source/WebKit2/Platform/IPC/Connection.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -26,6 +26,7 @@
#include "config.h"
#include "Connection.h"
+#include "Logging.h"
#include <memory>
#include <wtf/CurrentTime.h>
#include <wtf/HashSet.h>
@@ -573,7 +574,7 @@
// If that happens, we need to stop waiting, or we'll hang since we won't get
// any more incoming messages.
if (!isValid()) {
- RELEASE_LOG_ERROR("Connection::waitForSyncReply: Connection no longer valid, id = %" PRIu64, syncRequestID);
+ RELEASE_LOG_ERROR(IPC, "Connection::waitForSyncReply: Connection no longer valid, id = %" PRIu64, syncRequestID);
didReceiveSyncReply(sendSyncOptions);
return nullptr;
}
@@ -584,7 +585,7 @@
timedOut = !SyncMessageState::singleton().wait(absoluteTime);
}
- RELEASE_LOG_ERROR("Connection::waitForSyncReply: Timed-out while waiting for reply, id = %" PRIu64, syncRequestID);
+ RELEASE_LOG_ERROR(IPC, "Connection::waitForSyncReply: Timed-out while waiting for reply, id = %" PRIu64, syncRequestID);
didReceiveSyncReply(sendSyncOptions);
return nullptr;
Modified: trunk/Source/WebKit2/Platform/LogInitialization.h (205274 => 205275)
--- trunk/Source/WebKit2/Platform/LogInitialization.h 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/Platform/LogInitialization.h 2016-09-01 01:33:40 UTC (rev 205275)
@@ -27,7 +27,7 @@
#include <wtf/text/WTFString.h>
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
namespace WebKit {
@@ -36,4 +36,4 @@
} // namespace WebKit
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
Modified: trunk/Source/WebKit2/Platform/Logging.cpp (205274 => 205275)
--- trunk/Source/WebKit2/Platform/Logging.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/Platform/Logging.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -30,13 +30,11 @@
#include <wtf/text/CString.h>
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-#define DEFINE_LOG_CHANNEL(name) \
- WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name) = { WTFLogChannelOff, #name };
-WEBKIT2_LOG_CHANNELS(DEFINE_LOG_CHANNEL)
+#define DEFINE_WEBKIT2_LOG_CHANNEL(name) DEFINE_LOG_CHANNEL(name, LOG_CHANNEL_WEBKIT_SUBSYSTEM)
+WEBKIT2_LOG_CHANNELS(DEFINE_WEBKIT2_LOG_CHANNEL)
-#define LOG_CHANNEL_ADDRESS(name) &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name),
static WTFLogChannel* logChannels[] = {
WEBKIT2_LOG_CHANNELS(LOG_CHANNEL_ADDRESS)
};
@@ -43,7 +41,7 @@
namespace WebKit {
-const size_t logChannelCount = WTF_ARRAY_LENGTH(logChannels);
+static const size_t logChannelCount = WTF_ARRAY_LENGTH(logChannels);
void initializeLogChannelsIfNecessary()
{
@@ -62,4 +60,4 @@
} // namespace WebKit
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
Modified: trunk/Source/WebKit2/Platform/Logging.h (205274 => 205275)
--- trunk/Source/WebKit2/Platform/Logging.h 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/Platform/Logging.h 2016-09-01 01:33:40 UTC (rev 205275)
@@ -31,7 +31,7 @@
#include <wtf/Assertions.h>
#include <wtf/text/WTFString.h>
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
#ifndef LOG_CHANNEL_PREFIX
#define LOG_CHANNEL_PREFIX WebKit2Log
@@ -44,19 +44,22 @@
#define WEBKIT2_LOG_CHANNELS(M) \
M(ContextMenu) \
M(Gamepad) \
+ M(IconDatabase) \
M(IDB) \
- M(IconDatabase) \
M(IndexedDB) \
M(InspectorServer) \
+ M(IPC) \
M(KeyHandling) \
+ M(Layers) \
M(Network) \
M(NetworkCache) \
+ M(NetworkCacheSpeculativePreloading) \
M(NetworkCacheStorage) \
- M(NetworkCacheSpeculativePreloading) \
+ M(NetworkScheduling) \
M(NetworkSession) \
- M(NetworkScheduling) \
M(Plugins) \
M(Printing) \
+ M(ProcessSuspension) \
M(RemoteLayerTree) \
M(Resize) \
M(Selection) \
@@ -66,9 +69,6 @@
M(ViewGestures) \
M(VisibleRects) \
-#define DECLARE_LOG_CHANNEL(name) \
- extern WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name);
-
WEBKIT2_LOG_CHANNELS(DECLARE_LOG_CHANNEL)
#undef DECLARE_LOG_CHANNEL
@@ -77,6 +77,6 @@
}
#endif
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
#endif // Logging_h
Modified: trunk/Source/WebKit2/Platform/foundation/LoggingFoundation.mm (205274 => 205275)
--- trunk/Source/WebKit2/Platform/foundation/LoggingFoundation.mm 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/Platform/foundation/LoggingFoundation.mm 2016-09-01 01:33:40 UTC (rev 205275)
@@ -29,7 +29,7 @@
namespace WebKit {
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
static NSString * const defaultsDomain = @"WebKit2Logging";
Modified: trunk/Source/WebKit2/Platform/unix/LoggingUnix.cpp (205274 => 205275)
--- trunk/Source/WebKit2/Platform/unix/LoggingUnix.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/Platform/unix/LoggingUnix.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -29,7 +29,7 @@
namespace WebKit {
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
String logLevelString()
{
@@ -36,6 +36,6 @@
return getenv("WEBKIT_DEBUG");
}
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
}
Modified: trunk/Source/WebKit2/Shared/ChildProcess.cpp (205274 => 205275)
--- trunk/Source/WebKit2/Shared/ChildProcess.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/Shared/ChildProcess.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -26,6 +26,7 @@
#include "config.h"
#include "ChildProcess.h"
+#include "Logging.h"
#include "SandboxInitializationParameters.h"
#include <unistd.h>
@@ -53,7 +54,7 @@
// We use _exit here since the watchdog callback is called from another thread and we don't want
// global destructors or atexit handlers to be called from this thread while the main thread is busy
// doing its thing.
- RELEASE_LOG_ERROR("Exiting process early due to unacknowledged closed-connection");
+ RELEASE_LOG_ERROR(IPC, "Exiting process early due to unacknowledged closed-connection");
_exit(EXIT_FAILURE);
});
}
Modified: trunk/Source/WebKit2/Shared/WebKit2Initialize.cpp (205274 => 205275)
--- trunk/Source/WebKit2/Shared/WebKit2Initialize.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/Shared/WebKit2Initialize.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -56,10 +56,10 @@
WTF::initializeMainThread();
RunLoop::initializeMainRunLoop();
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
WebCore::initializeLogChannelsIfNecessary();
WebKit::initializeLogChannelsIfNecessary();
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
}
} // namespace WebKit
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (205274 => 205275)
--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2016-09-01 01:33:40 UTC (rev 205275)
@@ -35,6 +35,7 @@
#import "APIURL.h"
#import "AuthenticationDecisionListener.h"
#import "CompletionHandlerCallChecker.h"
+#import "Logging.h"
#import "NavigationActionData.h"
#import "PageLoadState.h"
#import "WKBackForwardListInternal.h"
@@ -825,7 +826,7 @@
#if PLATFORM(IOS)
void NavigationState::releaseNetworkActivityToken()
{
- RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), "%p UIProcess is releasing a background assertion because a page load completed", this);
+ RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p UIProcess is releasing a background assertion because a page load completed", this);
ASSERT(m_activityToken);
m_activityToken = nullptr;
}
@@ -838,7 +839,7 @@
if (m_releaseActivityTimer.isActive())
m_releaseActivityTimer.stop();
else {
- RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), "%p - UIProcess is taking a background assertion because a page load started", this);
+ RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - UIProcess is taking a background assertion because a page load started", this);
ASSERT(!m_activityToken);
m_activityToken = m_webView->_page->process().throttler().backgroundActivityToken();
}
Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (205274 => 205275)
--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -30,6 +30,7 @@
#include "CustomProtocolManagerProxyMessages.h"
#include "DatabaseProcessMessages.h"
#include "DownloadProxyMessages.h"
+#include "Logging.h"
#include "NetworkProcessCreationParameters.h"
#include "NetworkProcessMessages.h"
#include "SandboxExtension.h"
@@ -125,11 +126,11 @@
uint64_t callbackID = generateCallbackID();
auto token = throttler().backgroundActivityToken();
- RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is fetching Website data", this);
+ RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NetworkProcessProxy is taking a background assertion because the Network process is fetching Website data", this);
m_pendingFetchWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID](WebsiteData websiteData) {
completionHandler(WTFMove(websiteData));
- RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done fetching Website data", this);
+ RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done fetching Website data", this);
});
send(Messages::NetworkProcess::FetchWebsiteData(sessionID, dataTypes, fetchOptions, callbackID), 0);
@@ -139,11 +140,11 @@
{
auto callbackID = generateCallbackID();
auto token = throttler().backgroundActivityToken();
- RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data", this);
+ RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data", this);
m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID] {
completionHandler();
- RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data", this);
+ RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data", this);
});
send(Messages::NetworkProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince, callbackID), 0);
}
@@ -154,11 +155,11 @@
uint64_t callbackID = generateCallbackID();
auto token = throttler().backgroundActivityToken();
- RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data for several origins", this);
+ 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);
m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [this, token, completionHandler, sessionID] {
completionHandler();
- 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);
+ 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);
});
Vector<SecurityOriginData> originData;
@@ -401,12 +402,12 @@
void NetworkProcessProxy::setIsHoldingLockedFiles(bool isHoldingLockedFiles)
{
if (!isHoldingLockedFiles) {
- RELEASE_LOG("UIProcess is releasing a background assertion because the Network process is no longer holding locked files");
+ RELEASE_LOG(ProcessSuspension, "UIProcess is releasing a background assertion because the Network process is no longer holding locked files");
m_tokenForHoldingLockedFiles = nullptr;
return;
}
if (!m_tokenForHoldingLockedFiles) {
- RELEASE_LOG("UIProcess is taking a background assertion because the Network process is holding locked files");
+ RELEASE_LOG(ProcessSuspension, "UIProcess is taking a background assertion because the Network process is holding locked files");
m_tokenForHoldingLockedFiles = m_throttler.backgroundActivityToken();
}
}
Modified: trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp (205274 => 205275)
--- trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -26,6 +26,7 @@
#include "config.h"
#include "ProcessThrottler.h"
+#include "Logging.h"
#include "ProcessThrottlerClient.h"
namespace WebKit {
@@ -57,7 +58,7 @@
m_suspendTimer.stop();
if (m_assertion) {
if (m_assertion->state() != assertionState())
- RELEASE_LOG("%p - ProcessThrottler::updateAssertionNow() updating process assertion state to %u (foregroundActivities: %lu, backgroundActivities: %lu)", this, assertionState(), m_foregroundCounter.value(), m_backgroundCounter.value());
+ RELEASE_LOG(ProcessSuspension, "%p - ProcessThrottler::updateAssertionNow() updating process assertion state to %u (foregroundActivities: %lu, backgroundActivities: %lu)", this, assertionState(), m_foregroundCounter.value(), m_backgroundCounter.value());
m_assertion->setState(assertionState());
m_process.didSetAssertionState(assertionState());
}
@@ -70,7 +71,7 @@
// in the background for too long.
if (m_assertion && m_assertion->state() != AssertionState::Suspended && !m_foregroundCounter.value() && !m_backgroundCounter.value()) {
++m_suspendMessageCount;
- RELEASE_LOG("%p - ProcessThrottler::updateAssertion() sending PrepareToSuspend IPC", this);
+ RELEASE_LOG(ProcessSuspension, "%p - ProcessThrottler::updateAssertion() sending PrepareToSuspend IPC", this);
m_process.sendPrepareToSuspend();
m_suspendTimer.startOneShot(processSuspensionTimeout);
m_assertion->setState(AssertionState::Background);
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (205274 => 205275)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -179,7 +179,7 @@
#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, m_process->connection())
#define MESSAGE_CHECK_URL(url) MESSAGE_CHECK_BASE(m_process->checkURLReceivedFromWebProcess(url), m_process->connection())
-#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), ProcessSuspension, __VA_ARGS__)
using namespace WebCore;
Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (205274 => 205275)
--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -213,10 +213,10 @@
addLanguageChangeObserver(this, languageChanged);
-#if !LOG_DISABLED
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
WebCore::initializeLogChannelsIfNecessary();
WebKit::initializeLogChannelsIfNecessary();
-#endif // !LOG_DISABLED
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
#ifndef NDEBUG
processPoolCounter.increment();
Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (205274 => 205275)
--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -32,6 +32,7 @@
#include "CustomProtocolManagerProxyMessages.h"
#include "DataReference.h"
#include "DownloadProxyMap.h"
+#include "Logging.h"
#include "PluginInfoStore.h"
#include "PluginProcessManager.h"
#include "TextChecker.h"
@@ -709,7 +710,7 @@
ASSERT(canSendMessage());
auto token = throttler().backgroundActivityToken();
- RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is fetching Website data", this);
+ RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - WebProcessProxy is taking a background assertion because the Web process is fetching Website data", this);
connection()->sendWithReply(Messages::WebProcess::FetchWebsiteData(sessionID, dataTypes), 0, RunLoop::main(), [this, token, completionHandler = WTFMove(completionHandler), sessionID](auto reply) {
if (!reply) {
@@ -718,7 +719,7 @@
}
completionHandler(WTFMove(std::get<0>(*reply)));
- RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done fetching Website data", this);
+ RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - WebProcessProxy is releasing a background assertion because the Web process is done fetching Website data", this);
});
}
@@ -727,11 +728,11 @@
ASSERT(canSendMessage());
auto token = throttler().backgroundActivityToken();
- RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data", this);
+ RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data", this);
connection()->sendWithReply(Messages::WebProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince), 0, RunLoop::main(), [this, token, completionHandler = WTFMove(completionHandler), sessionID](auto reply) {
completionHandler();
- RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data", this);
+ RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data", this);
});
}
@@ -740,7 +741,7 @@
ASSERT(canSendMessage());
auto token = throttler().backgroundActivityToken();
- RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data for several origins", this);
+ 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);
Vector<SecurityOriginData> originData;
for (auto& origin : origins)
@@ -748,7 +749,7 @@
connection()->sendWithReply(Messages::WebProcess::DeleteWebsiteDataForOrigins(sessionID, dataTypes, originData), 0, RunLoop::main(), [this, token, completionHandler = WTFMove(completionHandler), sessionID](auto reply) {
completionHandler();
- 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);
+ 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);
});
}
@@ -945,7 +946,7 @@
switch (state) {
case AssertionState::Suspended:
- RELEASE_LOG("%p - WebProcessProxy::didSetAssertionState(Suspended) release all assertions for network process", this);
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcessProxy::didSetAssertionState(Suspended) release all assertions for network process", this);
m_foregroundTokenForNetworkProcess = nullptr;
m_backgroundTokenForNetworkProcess = nullptr;
for (auto& page : m_pageMap.values())
@@ -953,13 +954,13 @@
break;
case AssertionState::Background:
- RELEASE_LOG("%p - WebProcessProxy::didSetAssertionState(Background) taking background assertion for network process", this);
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcessProxy::didSetAssertionState(Background) taking background assertion for network process", this);
m_backgroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().backgroundActivityToken();
m_foregroundTokenForNetworkProcess = nullptr;
break;
case AssertionState::Foreground:
- RELEASE_LOG("%p - WebProcessProxy::didSetAssertionState(Foreground) taking foreground assertion for network process", this);
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcessProxy::didSetAssertionState(Foreground) taking foreground assertion for network process", this);
m_foregroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().foregroundActivityToken();
m_backgroundTokenForNetworkProcess = nullptr;
for (auto& page : m_pageMap.values())
@@ -976,12 +977,12 @@
void WebProcessProxy::setIsHoldingLockedFiles(bool isHoldingLockedFiles)
{
if (!isHoldingLockedFiles) {
- RELEASE_LOG("UIProcess is releasing a background assertion because the WebContent process is no longer holding locked files");
+ RELEASE_LOG(ProcessSuspension, "UIProcess is releasing a background assertion because the WebContent process is no longer holding locked files");
m_tokenForHoldingLockedFiles = nullptr;
return;
}
if (!m_tokenForHoldingLockedFiles) {
- RELEASE_LOG("UIProcess is taking a background assertion because the WebContent process is holding locked files");
+ RELEASE_LOG(ProcessSuspension, "UIProcess is taking a background assertion because the WebContent process is holding locked files");
m_tokenForHoldingLockedFiles = m_throttler.backgroundActivityToken();
}
}
Modified: trunk/Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm (205274 => 205275)
--- trunk/Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm 2016-09-01 01:33:40 UTC (rev 205275)
@@ -29,6 +29,7 @@
#if PLATFORM(IOS)
#import "AssertionServicesSPI.h"
+#import "Logging.h"
#import <UIKit/UIApplication.h>
#import <wtf/HashSet.h>
#import <wtf/RunLoop.h>
@@ -105,7 +106,7 @@
{
if (_needsToRunInBackgroundCount && _backgroundTask == UIBackgroundTaskInvalid) {
_backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithName:@"com.apple.WebKit.ProcessAssertion" expirationHandler:^{
- RELEASE_LOG_ERROR("Background task expired while holding WebKit ProcessAssertion (isMainThread? %d).", RunLoop::isMain());
+ RELEASE_LOG_ERROR(ProcessSuspension, "Background task expired while holding WebKit ProcessAssertion (isMainThread? %d).", RunLoop::isMain());
// The expiration handler gets called on a non-main thread when the underlying assertion could not be taken (rdar://problem/27278419).
if (RunLoop::isMain())
[self _notifyClientsOfImminentSuspension];
@@ -165,7 +166,7 @@
auto weakThis = createWeakPtr();
BKSProcessAssertionAcquisitionHandler handler = ^(BOOL acquired) {
if (!acquired) {
- RELEASE_LOG_ERROR("Unable to acquire assertion for process %d", pid);
+ RELEASE_LOG_ERROR(ProcessSuspension, "Unable to acquire assertion for process %d", pid);
ASSERT_NOT_REACHED();
dispatch_async(dispatch_get_main_queue(), ^{
if (weakThis)
Modified: trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp (205274 => 205275)
--- trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -57,8 +57,8 @@
using namespace WebCore;
-#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), __VA_ARGS__)
-#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__)
+#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__)
namespace WebKit {
Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (205274 => 205275)
--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -42,7 +42,7 @@
using namespace WebCore;
-#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, __VA_ARGS__)
namespace WebKit {
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (205274 => 205275)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -255,8 +255,8 @@
static const std::chrono::milliseconds initialLayerVolatilityTimerInterval { 20 };
static const std::chrono::seconds maximumLayerVolatilityTimerInterval { 2 };
-#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
-#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Layers, __VA_ARGS__)
+#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), Layers, __VA_ARGS__)
class SendStopResponsivenessTimer {
public:
@@ -2064,7 +2064,7 @@
bool didSucceed = markLayersVolatileImmediatelyIfPossible();
if (didSucceed || newInterval > maximumLayerVolatilityTimerInterval) {
m_layerVolatilityTimer.stop();
- RELEASE_LOG_IF_ALLOWED("%p - WebPage - Attempted to mark surfaces as volatile, success? %d", this, didSucceed);
+ RELEASE_LOG_IF_ALLOWED("%p - WebPage - Attempted to mark layers as volatile, success? %d", this, didSucceed);
callVolatilityCompletionHandlers();
return;
}
Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (205274 => 205275)
--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2016-09-01 01:23:56 UTC (rev 205274)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2016-09-01 01:33:40 UTC (rev 205275)
@@ -1272,10 +1272,10 @@
setAllLayerTreeStatesFrozen(true);
markAllLayersVolatile([this, shouldAcknowledgeWhenReadyToSuspend] {
- RELEASE_LOG("%p - WebProcess::markAllLayersVolatile() Successfuly marked all layers as volatile", this);
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::markAllLayersVolatile() Successfuly marked all layers as volatile", this);
if (shouldAcknowledgeWhenReadyToSuspend == ShouldAcknowledgeWhenReadyToSuspend::Yes) {
- RELEASE_LOG("%p - WebProcess::actualPrepareToSuspend() Sending ProcessReadyToSuspend IPC message", this);
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::actualPrepareToSuspend() Sending ProcessReadyToSuspend IPC message", this);
parentProcessConnection()->send(Messages::WebProcessProxy::ProcessReadyToSuspend(), 0);
}
});
@@ -1291,7 +1291,7 @@
return;
}
- RELEASE_LOG("%p - WebProcess::processWillSuspendImminently()", this);
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::processWillSuspendImminently()", this);
DatabaseTracker::tracker().closeAllDatabases(CurrentQueryBehavior::Interrupt);
actualPrepareToSuspend(ShouldAcknowledgeWhenReadyToSuspend::No);
handled = true;
@@ -1299,13 +1299,13 @@
void WebProcess::prepareToSuspend()
{
- RELEASE_LOG("%p - WebProcess::prepareToSuspend()", this);
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::prepareToSuspend()", this);
actualPrepareToSuspend(ShouldAcknowledgeWhenReadyToSuspend::Yes);
}
void WebProcess::cancelPrepareToSuspend()
{
- RELEASE_LOG("%p - WebProcess::cancelPrepareToSuspend()", this);
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::cancelPrepareToSuspend()", this);
setAllLayerTreeStatesFrozen(false);
// If we've already finished cleaning up and sent ProcessReadyToSuspend, we
@@ -1315,13 +1315,13 @@
cancelMarkAllLayersVolatile();
- RELEASE_LOG("%p - WebProcess::cancelPrepareToSuspend() Sending DidCancelProcessSuspension IPC message", this);
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::cancelPrepareToSuspend() Sending DidCancelProcessSuspension IPC message", this);
parentProcessConnection()->send(Messages::WebProcessProxy::DidCancelProcessSuspension(), 0);
}
void WebProcess::markAllLayersVolatile(std::function<void()> completionHandler)
{
- RELEASE_LOG("%p - WebProcess::markAllLayersVolatile()", this);
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::markAllLayersVolatile()", this);
m_pagesMarkingLayersAsVolatile = m_pageMap.size();
if (!m_pagesMarkingLayersAsVolatile) {
completionHandler();
@@ -1354,7 +1354,7 @@
void WebProcess::processDidResume()
{
- RELEASE_LOG("%p - WebProcess::processDidResume()", this);
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::processDidResume()", this);
cancelMarkAllLayersVolatile();
setAllLayerTreeStatesFrozen(false);