Diff
Modified: trunk/Source/WebCore/ChangeLog (211303 => 211304)
--- trunk/Source/WebCore/ChangeLog 2017-01-27 22:39:33 UTC (rev 211303)
+++ trunk/Source/WebCore/ChangeLog 2017-01-27 23:11:17 UTC (rev 211304)
@@ -1,3 +1,27 @@
+2017-01-27 Chris Dumez <cdu...@apple.com>
+
+ Fix remaining bad uses of logDiagnosticMessageWithValue()
+ https://bugs.webkit.org/show_bug.cgi?id=167526
+
+ Reviewed by Alex Christensen.
+
+ Drop unused keys, add new ones.
+
+ * page/DiagnosticLoggingKeys.cpp:
+ (WebCore::DiagnosticLoggingKeys::networkCacheFailureReasonKey):
+ (WebCore::DiagnosticLoggingKeys::networkCacheUnusedReasonKey):
+ (WebCore::DiagnosticLoggingKeys::networkCacheReuseFailureKey):
+ (WebCore::DiagnosticLoggingKeys::backNavigationDeltaKey):
+ (WebCore::DiagnosticLoggingKeys::userZoomActionKey):
+ (WebCore::DiagnosticLoggingKeys::deltaKey): Deleted.
+ (WebCore::DiagnosticLoggingKeys::backNavigationKey): Deleted.
+ (WebCore::DiagnosticLoggingKeys::requestKey): Deleted.
+ (WebCore::DiagnosticLoggingKeys::unusableCachedEntryKey): Deleted.
+ (WebCore::DiagnosticLoggingKeys::userKey): Deleted.
+ (WebCore::DiagnosticLoggingKeys::zoomedKey): Deleted.
+ (WebCore::DiagnosticLoggingKeys::notInCacheKey): Deleted.
+ * page/DiagnosticLoggingKeys.h:
+
2017-01-27 Myles C. Maxfield <mmaxfi...@apple.com>
Proclaim that we are considering font-display, rhythmic sizing, and text decoration level 4
Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp (211303 => 211304)
--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp 2017-01-27 22:39:33 UTC (rev 211303)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp 2017-01-27 23:11:17 UTC (rev 211304)
@@ -153,6 +153,21 @@
return ASCIILiteral("networkCache");
}
+String DiagnosticLoggingKeys::networkCacheFailureReasonKey()
+{
+ return ASCIILiteral("networkCacheFailureReason");
+}
+
+String DiagnosticLoggingKeys::networkCacheUnusedReasonKey()
+{
+ return ASCIILiteral("networkCacheUnusedReason");
+}
+
+String DiagnosticLoggingKeys::networkCacheReuseFailureKey()
+{
+ return ASCIILiteral("networkCacheReuseFailure");
+}
+
String DiagnosticLoggingKeys::networkKey()
{
return ASCIILiteral("network");
@@ -343,11 +358,6 @@
return ASCIILiteral("createSharedBufferFailed");
}
-String DiagnosticLoggingKeys::deltaKey()
-{
- return ASCIILiteral("delta");
-}
-
String DiagnosticLoggingKeys::activeInForegroundTabKey()
{
return ASCIILiteral("activeInForegroundTab");
@@ -368,9 +378,9 @@
return ASCIILiteral("audio");
}
-String DiagnosticLoggingKeys::backNavigationKey()
+String DiagnosticLoggingKeys::backNavigationDeltaKey()
{
- return ASCIILiteral("backNavigation");
+ return ASCIILiteral("backNavigationDelta");
}
String DiagnosticLoggingKeys::canCacheKey()
@@ -433,11 +443,6 @@
return ASCIILiteral("replace");
}
-String DiagnosticLoggingKeys::requestKey()
-{
- return ASCIILiteral("request");
-}
-
String DiagnosticLoggingKeys::retrievalRequestKey()
{
return ASCIILiteral("retrievalRequest");
@@ -538,11 +543,6 @@
return ASCIILiteral("unsuspendableDOMObject");
}
-String DiagnosticLoggingKeys::unusableCachedEntryKey()
-{
- return ASCIILiteral("unusableCachedEntry");
-}
-
String DiagnosticLoggingKeys::unusedKey()
{
return ASCIILiteral("unused");
@@ -588,9 +588,9 @@
return ASCIILiteral("used");
}
-String DiagnosticLoggingKeys::userKey()
+String DiagnosticLoggingKeys::userZoomActionKey()
{
- return ASCIILiteral("user");
+ return ASCIILiteral("userZoomAction");
}
String DiagnosticLoggingKeys::varyingHeaderMismatchKey()
@@ -633,11 +633,6 @@
return ASCIILiteral("yes");
}
-String DiagnosticLoggingKeys::zoomedKey()
-{
- return ASCIILiteral("zoomed");
-}
-
String DiagnosticLoggingKeys::expiredKey()
{
return ASCIILiteral("expired");
@@ -678,11 +673,6 @@
return ASCIILiteral("notHTTPFamily");
}
-String DiagnosticLoggingKeys::notInCacheKey()
-{
- return ASCIILiteral("notInCache");
-}
-
String WebCore::DiagnosticLoggingKeys::webGLStateKey()
{
return ASCIILiteral("webGLState");
Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (211303 => 211304)
--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h 2017-01-27 22:39:33 UTC (rev 211303)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h 2017-01-27 23:11:17 UTC (rev 211304)
@@ -35,7 +35,7 @@
WEBCORE_EXPORT static String activeInBackgroundTabOnlyKey();
static String applicationCacheKey();
static String audioKey();
- WEBCORE_EXPORT static String backNavigationKey();
+ WEBCORE_EXPORT static String backNavigationDeltaKey();
WEBCORE_EXPORT static String cacheControlNoStoreKey();
static String cachedResourceRevalidationKey();
static String cachedResourceRevalidationReasonKey();
@@ -43,7 +43,6 @@
static String cannotSuspendActiveDOMObjectsKey();
WEBCORE_EXPORT static String cpuUsageKey();
WEBCORE_EXPORT static String createSharedBufferFailedKey();
- WEBCORE_EXPORT static String deltaKey();
static String deniedByClientKey();
static String deviceMotionKey();
static String deviceOrientationKey();
@@ -83,6 +82,9 @@
static String navigationKey();
WEBCORE_EXPORT static String needsRevalidationKey();
WEBCORE_EXPORT static String networkCacheKey();
+ WEBCORE_EXPORT static String networkCacheFailureReasonKey();
+ WEBCORE_EXPORT static String networkCacheUnusedReasonKey();
+ WEBCORE_EXPORT static String networkCacheReuseFailureKey();
static String networkKey();
WEBCORE_EXPORT static String networkProcessCrashedKey();
WEBCORE_EXPORT static String neverSeenBeforeKey();
@@ -94,7 +96,6 @@
static String noStoreKey();
WEBCORE_EXPORT static String nonVisibleStateKey();
WEBCORE_EXPORT static String notHTTPFamilyKey();
- WEBCORE_EXPORT static String notInCacheKey();
static String notInMemoryCacheKey();
WEBCORE_EXPORT static String otherKey();
static String pageCacheKey();
@@ -122,7 +123,6 @@
static String reloadFromOriginKey();
static String reloadKey();
static String replaceKey();
- WEBCORE_EXPORT static String requestKey();
static String resourceLoadedKey();
static String resourceResponseSourceKey();
WEBCORE_EXPORT static String retrievalKey();
@@ -142,7 +142,6 @@
WEBCORE_EXPORT static String unlikelyToReuseKey();
WEBCORE_EXPORT static String unsupportedHTTPMethodKey();
static String unsuspendableDOMObjectKey();
- WEBCORE_EXPORT static String unusableCachedEntryKey();
WEBCORE_EXPORT static String unusedKey();
static String unusedReasonCredentialSettingsKey();
static String unusedReasonErrorKey();
@@ -152,7 +151,7 @@
static String unusedReasonReloadKey();
static String unusedReasonTypeMismatchKey();
static String usedKey();
- WEBCORE_EXPORT static String userKey();
+ WEBCORE_EXPORT static String userZoomActionKey();
WEBCORE_EXPORT static String varyingHeaderMismatchKey();
static String videoKey();
WEBCORE_EXPORT static String visibleNonActiveStateKey();
@@ -162,7 +161,6 @@
WEBCORE_EXPORT static String webGLStateKey();
WEBCORE_EXPORT static String webViewKey();
static String yesKey();
- WEBCORE_EXPORT static String zoomedKey();
WEBCORE_EXPORT static String memoryUsageToDiagnosticLoggingKey(uint64_t memoryUsage);
WEBCORE_EXPORT static String foregroundCPUUsageToDiagnosticLoggingKey(double cpuUsage);
Modified: trunk/Source/WebKit2/ChangeLog (211303 => 211304)
--- trunk/Source/WebKit2/ChangeLog 2017-01-27 22:39:33 UTC (rev 211303)
+++ trunk/Source/WebKit2/ChangeLog 2017-01-27 23:11:17 UTC (rev 211304)
@@ -1,5 +1,24 @@
2017-01-27 Chris Dumez <cdu...@apple.com>
+ Fix remaining bad uses of logDiagnosticMessageWithValue()
+ https://bugs.webkit.org/show_bug.cgi?id=167526
+
+ Reviewed by Alex Christensen.
+
+ Fix remaining bad uses of logDiagnosticMessageWithValue(). It can only
+ be called with numeric values.
+
+ * NetworkProcess/cache/NetworkCacheStatistics.cpp:
+ (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
+ (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
+ (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
+ * UIProcess/WebBackForwardList.cpp:
+ (WebKit::WebBackForwardList::goToItem):
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::willStartUserTriggeredZooming):
+
+2017-01-27 Chris Dumez <cdu...@apple.com>
+
Round CPU Usage diagnostic logging to 2 significant digits
https://bugs.webkit.org/show_bug.cgi?id=167515
<rdar://problem/30236297>
Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.cpp (211303 => 211304)
--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.cpp 2017-01-27 22:39:33 UTC (rev 211303)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.cpp 2017-01-27 23:11:17 UTC (rev 211304)
@@ -220,9 +220,9 @@
if (wasEverRequested) {
String diagnosticKey = retrieveDecisionToDiagnosticKey(retrieveDecision);
LOG(NetworkCache, "(NetworkProcess) webPageID %" PRIu64 ": %s was previously requested but we are not using the cache, reason: %s", webPageID, requestURL.string().ascii().data(), diagnosticKey.utf8().data());
- NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::unusedKey(), diagnosticKey, WebCore::ShouldSample::Yes);
+ NetworkProcess::singleton().logDiagnosticMessage(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheUnusedReasonKey(), diagnosticKey, WebCore::ShouldSample::Yes);
} else {
- NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::requestKey(), WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey(), WebCore::ShouldSample::Yes);
+ NetworkProcess::singleton().logDiagnosticMessage(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheUnusedReasonKey(), WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey(), WebCore::ShouldSample::Yes);
markAsRequested(hash);
}
});
@@ -260,9 +260,9 @@
if (wasPreviouslyRequested) {
String diagnosticKey = storeDecisionToDiagnosticKey(storeDecision.value());
LOG(NetworkCache, "(NetworkProcess) webPageID %" PRIu64 ": %s was previously request but is not in the cache, reason: %s", webPageID, requestURL.string().ascii().data(), diagnosticKey.utf8().data());
- NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::notInCacheKey(), diagnosticKey, WebCore::ShouldSample::Yes);
+ NetworkProcess::singleton().logDiagnosticMessage(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheFailureReasonKey(), diagnosticKey, WebCore::ShouldSample::Yes);
} else {
- NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::requestKey(), WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey(), WebCore::ShouldSample::Yes);
+ NetworkProcess::singleton().logDiagnosticMessage(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheFailureReasonKey(), WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey(), WebCore::ShouldSample::Yes);
markAsRequested(hash);
}
});
@@ -297,13 +297,13 @@
if (decision == UseDecision::Validate) {
LOG(NetworkCache, "(NetworkProcess) webPageID %" PRIu64 ": %s is in the cache but needs revalidation", webPageID, requestURL.string().ascii().data());
- NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::retrievalKey(), WebCore::DiagnosticLoggingKeys::needsRevalidationKey(), WebCore::ShouldSample::Yes);
+ NetworkProcess::singleton().logDiagnosticMessage(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::needsRevalidationKey(), WebCore::ShouldSample::Yes);
return;
}
String diagnosticKey = cachedEntryReuseFailureToDiagnosticKey(decision);
LOG(NetworkCache, "(NetworkProcess) webPageID %" PRIu64 ": %s is in the cache but wasn't used, reason: %s", webPageID, requestURL.string().ascii().data(), diagnosticKey.utf8().data());
- NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::unusableCachedEntryKey(), diagnosticKey, WebCore::ShouldSample::Yes);
+ NetworkProcess::singleton().logDiagnosticMessage(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheReuseFailureKey(), diagnosticKey, WebCore::ShouldSample::Yes);
}
void Statistics::recordRevalidationSuccess(uint64_t webPageID, const Key& key, const WebCore::ResourceRequest& request)
Modified: trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp (211303 => 211304)
--- trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp 2017-01-27 22:39:33 UTC (rev 211303)
+++ trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp 2017-01-27 23:11:17 UTC (rev 211304)
@@ -179,7 +179,7 @@
if (targetIndex < m_currentIndex) {
unsigned delta = m_entries.size() - targetIndex - 1;
String deltaValue = delta > 10 ? ASCIILiteral("over10") : String::number(delta);
- m_page->logDiagnosticMessageWithValue(WebCore::DiagnosticLoggingKeys::backNavigationKey(), WebCore::DiagnosticLoggingKeys::deltaKey(), deltaValue, false /* shouldSample */);
+ m_page->logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::backNavigationDeltaKey(), deltaValue, false /* shouldSample */);
}
// If we're going to an item different from the current item, ask the client if the current
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (211303 => 211304)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2017-01-27 22:39:33 UTC (rev 211303)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2017-01-27 23:11:17 UTC (rev 211304)
@@ -3127,7 +3127,7 @@
void WebPage::willStartUserTriggeredZooming()
{
- m_page->diagnosticLoggingClient().logDiagnosticMessageWithValue(DiagnosticLoggingKeys::webViewKey(), DiagnosticLoggingKeys::userKey(), DiagnosticLoggingKeys::zoomedKey(), ShouldSample::No);
+ m_page->diagnosticLoggingClient().logDiagnosticMessage(DiagnosticLoggingKeys::webViewKey(), DiagnosticLoggingKeys::userZoomActionKey(), ShouldSample::No);
m_userHasChangedPageScaleFactor = true;
}