Unreviewed, rolling out r179910.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Feb 2015 08:01:19 +0000 (08:01 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Feb 2015 08:01:19 +0000 (08:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141464

Caused assertions on debug bots (Requested by ap on #webkit).

Reverted changeset:

"[WK2] Add logging to validate the network cache efficacy
(Part 2)"
https://bugs.webkit.org/show_bug.cgi?id=141345
http://trac.webkit.org/changeset/179910

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179919 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/page/DiagnosticLoggingKeys.cpp
Source/WebCore/page/DiagnosticLoggingKeys.h
Source/WebCore/platform/sql/SQLiteDatabaseTracker.h
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkProcess.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.h
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCache.h
Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.h
Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm
Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h
Source/WebKit2/UIProcess/Network/NetworkProcessProxy.messages.in
Source/WebKit2/UIProcess/WebPageProxy.h

index ce098bc..0503f77 100644 (file)
@@ -1,3 +1,17 @@
+2015-02-11  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r179910.
+        https://bugs.webkit.org/show_bug.cgi?id=141464
+
+        Caused assertions on debug bots (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        "[WK2] Add logging to validate the network cache efficacy
+        (Part 2)"
+        https://bugs.webkit.org/show_bug.cgi?id=141345
+        http://trac.webkit.org/changeset/179910
+
 2015-02-10  Chris Dumez  <cdumez@apple.com>
 
         Optimize MutableStyleProperties::removePropertiesInSet()
index e30d5f2..c003730 100644 (file)
@@ -945,11 +945,6 @@ __ZN7WebCore21BlobDataFileReferenceD2Ev
 __ZN7WebCore21CrossThreadCopierBaseILb0ELb0EN3WTF6StringEE4copyERKS2_
 __ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_19IDBDatabaseMetadataEE4copyERKS1_
 __ZN7WebCore21DiagnosticLoggingKeys10webViewKeyEv
-__ZN7WebCore21DiagnosticLoggingKeys12retrievalKeyEv
-__ZN7WebCore21DiagnosticLoggingKeys15networkCacheKeyEv
-__ZN7WebCore21DiagnosticLoggingKeys25noLongerInCacheFailureKeyEv
-__ZN7WebCore21DiagnosticLoggingKeys26unhandledRequestFailureKeyEv
-__ZN7WebCore21DiagnosticLoggingKeys29unusableCachedEntryFailureKeyEv
 __ZN7WebCore21DiagnosticLoggingKeys7userKeyEv
 __ZN7WebCore21DiagnosticLoggingKeys9zoomedKeyEv
 __ZN7WebCore21DisplayRefreshMonitor46handleDisplayRefreshedNotificationOnMainThreadEPv
index 39ff5d8..4645f72 100644 (file)
@@ -103,11 +103,6 @@ String DiagnosticLoggingKeys::navigationKey()
     return ASCIILiteral("navigation");
 }
 
-String DiagnosticLoggingKeys::networkCacheKey()
-{
-    return ASCIILiteral("networkCache");
-}
-
 String DiagnosticLoggingKeys::networkKey()
 {
     return ASCIILiteral("network");
@@ -138,11 +133,6 @@ String DiagnosticLoggingKeys::noDocumentLoaderKey()
     return ASCIILiteral("noDocumentLoader");
 }
 
-String DiagnosticLoggingKeys::noLongerInCacheFailureKey()
-{
-    return ASCIILiteral("noLongerInCacheFailure");
-}
-
 String DiagnosticLoggingKeys::otherKey()
 {
     return ASCIILiteral("other");
@@ -308,11 +298,6 @@ String DiagnosticLoggingKeys::resourceResponseKey()
     return ASCIILiteral("resourceResponse");
 }
 
-String DiagnosticLoggingKeys::retrievalKey()
-{
-    return ASCIILiteral("retrieval");
-}
-
 String DiagnosticLoggingKeys::revalidatingKey()
 {
     return ASCIILiteral("revalidating");
@@ -348,16 +333,6 @@ String DiagnosticLoggingKeys::svgDocumentKey()
     return ASCIILiteral("svgDocument");
 }
 
-String DiagnosticLoggingKeys::unhandledRequestFailureKey()
-{
-    return ASCIILiteral("unhandledRequestFailure");
-}
-
-String DiagnosticLoggingKeys::unusableCachedEntryFailureKey()
-{
-    return ASCIILiteral("unusableCachedEntryFailure");
-}
-
 String DiagnosticLoggingKeys::unusedKey()
 {
     return ASCIILiteral("unused");
index f9ca21d..92b2d3e 100644 (file)
@@ -63,12 +63,10 @@ public:
     static String mediaLoadingFailedKey();
     static String mustRevalidateIsExpiredKey();
     static String navigationKey();
-    WEBCORE_EXPORT static String networkCacheKey();
     static String networkKey();
     static String noCacheKey();
     static String noCurrentHistoryItemKey();
     static String noDocumentLoaderKey();
-    WEBCORE_EXPORT static String noLongerInCacheFailureKey();
     static String noStoreKey();
     static String notInMemoryCacheKey();
     static String otherKey();
@@ -92,15 +90,12 @@ public:
     static String resourceKey();
     static String resourceRequestKey();
     static String resourceResponseKey();
-    WEBCORE_EXPORT static String retrievalKey();
     static String revalidatingKey();
     static String sameLoadKey();
     static String scriptKey();
     static String sourceKey();
     static String styleSheetKey();
     static String svgDocumentKey();
-    WEBCORE_EXPORT static String unhandledRequestFailureKey();
-    WEBCORE_EXPORT static String unusableCachedEntryFailureKey();
     static String unusedKey();
     static String unusedReasonCredentialSettingsKey();
     static String unusedReasonErrorKey();
index 45b01c6..1e4392f 100644 (file)
@@ -38,7 +38,7 @@ WEBCORE_EXPORT void incrementTransactionInProgressCount();
 WEBCORE_EXPORT void setClient(SQLiteDatabaseTrackerClient*);
 
 #if !ASSERT_DISABLED
-WEBCORE_EXPORT bool hasTransactionInProgress();
+bool hasTransactionInProgress();
 #endif
 
 };
index a0246a4..9052326 100644 (file)
@@ -1,3 +1,17 @@
+2015-02-11  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r179910.
+        https://bugs.webkit.org/show_bug.cgi?id=141464
+
+        Caused assertions on debug bots (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        "[WK2] Add logging to validate the network cache efficacy
+        (Part 2)"
+        https://bugs.webkit.org/show_bug.cgi?id=141345
+        http://trac.webkit.org/changeset/179910
+
 2015-02-10  Chris Dumez  <cdumez@apple.com>
 
         [WK2] Add logging to validate the network cache efficacy (Part 2)
index 2c90b02..69a6383 100644 (file)
@@ -301,21 +301,6 @@ void NetworkProcess::getNetworkProcessStatistics(uint64_t callbackID)
     parentProcessConnection()->send(Messages::WebProcessPool::DidGetStatistics(data, callbackID), 0);
 }
 
-void NetworkProcess::logDiagnosticMessage(uint64_t webPageID, const String& message, const String& description)
-{
-    parentProcessConnection()->send(Messages::NetworkProcessProxy::LogDiagnosticMessage(webPageID, message, description), 0);
-}
-
-void NetworkProcess::logDiagnosticMessageWithResult(uint64_t webPageID, const String& message, const String& description, WebCore::DiagnosticLoggingResultType result)
-{
-    parentProcessConnection()->send(Messages::NetworkProcessProxy::LogDiagnosticMessageWithResult(webPageID, message, description, result), 0);
-}
-
-void NetworkProcess::logDiagnosticMessageWithValue(uint64_t webPageID, const String& message, const String& description, const String& value)
-{
-    parentProcessConnection()->send(Messages::NetworkProcessProxy::LogDiagnosticMessageWithValue(webPageID, message, description, value), 0);
-}
-
 void NetworkProcess::terminate()
 {
     platformTerminate();
index c9db647..ad1e291 100644 (file)
@@ -33,7 +33,6 @@
 #include "DownloadManager.h"
 #include "MessageReceiverMap.h"
 #include "NetworkResourceLoadScheduler.h"
-#include <WebCore/DiagnosticLoggingResultType.h>
 #include <WebCore/SessionID.h>
 #include <memory>
 #include <wtf/Forward.h>
@@ -76,11 +75,6 @@ public:
     DownloadManager& downloadManager();
     bool canHandleHTTPSServerTrustEvaluation() const { return m_canHandleHTTPSServerTrustEvaluation; }
 
-    // Diagnostic messages logging.
-    void logDiagnosticMessage(uint64_t webPageID, const String& message, const String& description);
-    void logDiagnosticMessageWithResult(uint64_t webPageID, const String& message, const String& description, WebCore::DiagnosticLoggingResultType);
-    void logDiagnosticMessageWithValue(uint64_t webPageID, const String& message, const String& description, const String& value);
-
 private:
     NetworkProcess();
     ~NetworkProcess();
index a3d0c86..01ac936 100644 (file)
@@ -141,7 +141,7 @@ void NetworkResourceLoader::start()
     }
 
     RefPtr<NetworkResourceLoader> loader(this);
-    NetworkCache::singleton().retrieve(originalRequest(), m_parameters.webPageID, [loader](std::unique_ptr<NetworkCache::Entry> entry) {
+    NetworkCache::singleton().retrieve(originalRequest(), [loader](std::unique_ptr<NetworkCache::Entry> entry) {
         if (loader->hasOneRef()) {
             // The loader has been aborted and is only held alive by this lambda.
             return;
index 33b1656..d4770aa 100644 (file)
@@ -218,7 +218,7 @@ static NetworkCacheKey makeCacheKey(const WebCore::ResourceRequest& request)
     return NetworkCacheKey(request.httpMethod(), partition, request.url().string());
 }
 
-void NetworkCache::retrieve(const WebCore::ResourceRequest& originalRequest, uint64_t webPageID, std::function<void (std::unique_ptr<Entry>)> completionHandler)
+void NetworkCache::retrieve(const WebCore::ResourceRequest& originalRequest, std::function<void (std::unique_ptr<Entry>)> completionHandler)
 {
     ASSERT(isEnabled());
 
@@ -227,7 +227,7 @@ void NetworkCache::retrieve(const WebCore::ResourceRequest& originalRequest, uin
     NetworkCacheKey storageKey = makeCacheKey(originalRequest);
     if (!canRetrieve(originalRequest)) {
         if (m_statistics)
-            m_statistics->recordNotUsingCacheForRequest(webPageID, storageKey, originalRequest);
+            m_statistics->recordNotUsingCacheForRequest(storageKey, originalRequest);
 
         completionHandler(nullptr);
         return;
@@ -236,12 +236,12 @@ void NetworkCache::retrieve(const WebCore::ResourceRequest& originalRequest, uin
     auto startTime = std::chrono::system_clock::now();
     unsigned priority = originalRequest.priority();
 
-    m_storage->retrieve(storageKey, priority, [this, originalRequest, completionHandler, startTime, storageKey, webPageID](std::unique_ptr<NetworkCacheStorage::Entry> entry) {
+    m_storage->retrieve(storageKey, priority, [this, originalRequest, completionHandler, startTime, storageKey](std::unique_ptr<NetworkCacheStorage::Entry> entry) {
         if (!entry) {
             LOG(NetworkCache, "(NetworkProcess) not found in storage");
 
             if (m_statistics)
-                m_statistics->recordRetrievalFailure(webPageID, storageKey, originalRequest);
+                m_statistics->recordRetrievalFailure(storageKey, originalRequest);
 
             completionHandler(nullptr);
             return false;
@@ -249,7 +249,7 @@ void NetworkCache::retrieve(const WebCore::ResourceRequest& originalRequest, uin
         auto decodedEntry = decodeStorageEntry(*entry, originalRequest);
         bool success = !!decodedEntry;
         if (m_statistics)
-            m_statistics->recordRetrievedCachedEntry(webPageID, storageKey, originalRequest, success);
+            m_statistics->recordRetrievedCachedEntry(storageKey, originalRequest, success);
 
 #if !LOG_DISABLED
         auto elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() - startTime).count();
index 4af3187..40e43fc 100644 (file)
@@ -64,7 +64,7 @@ public:
         bool needsRevalidation;
     };
     // Completion handler may get called back synchronously on failure.
-    void retrieve(const WebCore::ResourceRequest&, uint64_t webPageID, std::function<void (std::unique_ptr<Entry>)>);
+    void retrieve(const WebCore::ResourceRequest&, std::function<void (std::unique_ptr<Entry>)>);
 
     struct MappedBody {
 #if ENABLE(SHAREABLE_RESOURCE)
index 65cfd6c..bb52387 100644 (file)
@@ -44,9 +44,9 @@ public:
 
     void clear();
 
-    void recordNotUsingCacheForRequest(uint64_t webPageID, const NetworkCacheKey&, const WebCore::ResourceRequest&);
-    void recordRetrievalFailure(uint64_t webPageID, const NetworkCacheKey&, const WebCore::ResourceRequest&);
-    void recordRetrievedCachedEntry(uint64_t webPageID, const NetworkCacheKey&, const WebCore::ResourceRequest&, bool success);
+    void recordNotUsingCacheForRequest(const NetworkCacheKey&, const WebCore::ResourceRequest&);
+    void recordRetrievalFailure(const NetworkCacheKey&, const WebCore::ResourceRequest&);
+    void recordRetrievedCachedEntry(const NetworkCacheKey&, const WebCore::ResourceRequest&, bool success);
 
 private:
     explicit NetworkCacheStatistics(const String& databasePath);
index c13fd0e..1227946 100644 (file)
@@ -31,9 +31,6 @@
 #include "Logging.h"
 #include "NetworkCache.h"
 #include "NetworkCacheFileSystemPosix.h"
-#include "NetworkProcess.h"
-#include <WebCore/DiagnosticLoggingKeys.h>
-#include <WebCore/DiagnosticLoggingResultType.h>
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/SQLiteDatabaseTracker.h>
 #include <WebCore/SQLiteStatement.h>
@@ -168,42 +165,40 @@ void NetworkCacheStatistics::shrinkIfNeeded()
     });
 }
 
-void NetworkCacheStatistics::recordNotUsingCacheForRequest(uint64_t webPageID, const NetworkCacheKey& key, const WebCore::ResourceRequest& request)
+void NetworkCacheStatistics::recordNotUsingCacheForRequest(const NetworkCacheKey& key, const WebCore::ResourceRequest& request)
 {
     String hash = key.hashAsString();
     WebCore::URL requestURL = request.url();
-    queryWasEverRequested(hash, [this, hash, requestURL, webPageID](bool wasEverRequested) {
+    queryWasEverRequested(hash, [this, hash, requestURL](bool wasEverRequested) {
         if (wasEverRequested) {
-            LOG(NetworkCache, "(NetworkProcess) webPageID %llu: %s was previously requested but is not handled by the cache", webPageID, requestURL.string().ascii().data());
-            NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::retrievalKey(), WebCore::DiagnosticLoggingKeys::unhandledRequestFailureKey());
+            LOG(NetworkCache, "(NetworkProcess) %s was previously requested but is not handled by the cache", requestURL.string().ascii().data());
+            // FIXME: Do diagnostic logging.
         } else
             markAsRequested(hash);
     });
 }
 
-void NetworkCacheStatistics::recordRetrievalFailure(uint64_t webPageID, const NetworkCacheKey& key, const WebCore::ResourceRequest& request)
+void NetworkCacheStatistics::recordRetrievalFailure(const NetworkCacheKey& key, const WebCore::ResourceRequest& request)
 {
     String hash = key.hashAsString();
     WebCore::URL requestURL = request.url();
-    queryWasEverRequested(hash, [this, hash, requestURL, webPageID](bool wasPreviouslyRequested) {
+    queryWasEverRequested(hash, [this, hash, requestURL](bool wasPreviouslyRequested) {
         if (wasPreviouslyRequested) {
-            LOG(NetworkCache, "(NetworkProcess) webPageID %llu: %s was previously cached but is no longer in the cache", webPageID, requestURL.string().ascii().data());
-            NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::retrievalKey(), WebCore::DiagnosticLoggingKeys::noLongerInCacheFailureKey());
+            LOG(NetworkCache, "(NetworkProcess) %s was previously cached but is no longer in the cache", requestURL.string().ascii().data());
+            // FIXME: Do diagnostic logging.
         } else
             markAsRequested(hash);
     });
 }
 
-void NetworkCacheStatistics::recordRetrievedCachedEntry(uint64_t webPageID, const NetworkCacheKey& key, const WebCore::ResourceRequest& request, bool success)
+void NetworkCacheStatistics::recordRetrievedCachedEntry(const NetworkCacheKey& key, const WebCore::ResourceRequest& request, bool success)
 {
     WebCore::URL requestURL = request.url();
-    if (success) {
-        LOG(NetworkCache, "(NetworkProcess) webPageID %llu: %s is in the cache and is used", webPageID, requestURL.string().ascii().data());
-        NetworkProcess::singleton().logDiagnosticMessageWithResult(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::retrievalKey(), WebCore::DiagnosticLoggingResultPass);
-    } else {
-        LOG(NetworkCache, "(NetworkProcess) webPageID %llu: %s is in the cache but wasn't used", webPageID, requestURL.string().ascii().data());
-        NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::retrievalKey(), WebCore::DiagnosticLoggingKeys::unusableCachedEntryFailureKey());
-    }
+    if (success)
+        LOG(NetworkCache, "(NetworkProcess) %s is in the cache and is used", requestURL.string().ascii().data());
+    else
+        LOG(NetworkCache, "(NetworkProcess) %s is in the cache but wasn't used", requestURL.string().ascii().data());
+    // FIXME: Do diagnostic logging.
 }
 
 void NetworkCacheStatistics::markAsRequested(const String& hash)
index 534e0d8..d5f33fc 100644 (file)
@@ -230,30 +230,6 @@ void NetworkProcessProxy::didFinishLaunching(ProcessLauncher* launcher, IPC::Con
 #endif
 }
 
-void NetworkProcessProxy::logDiagnosticMessage(uint64_t pageID, const String& message, const String& description)
-{
-    WebPageProxy* page = WebProcessProxy::webPage(pageID);
-    MESSAGE_CHECK(page);
-
-    page->logDiagnosticMessage(message, description);
-}
-
-void NetworkProcessProxy::logDiagnosticMessageWithResult(uint64_t pageID, const String& message, const String& description, uint32_t result)
-{
-    WebPageProxy* page = WebProcessProxy::webPage(pageID);
-    MESSAGE_CHECK(page);
-
-    page->logDiagnosticMessageWithResult(message, description, result);
-}
-
-void NetworkProcessProxy::logDiagnosticMessageWithValue(uint64_t pageID, const String& message, const String& description, const String& value)
-{
-    WebPageProxy* page = WebProcessProxy::webPage(pageID);
-    MESSAGE_CHECK(page);
-
-    page->logDiagnosticMessageWithValue(message, description, value);
-}
-
 } // namespace WebKit
 
 #endif // ENABLE(NETWORK_PROCESS)
index 3f89627..cd996d1 100644 (file)
@@ -91,9 +91,6 @@ private:
     void didCreateNetworkConnectionToWebProcess(const IPC::Attachment&);
     void didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, const WebCore::AuthenticationChallenge&, uint64_t challengeID);
     void didDeleteWebsiteData(uint64_t callbackID);
-    void logDiagnosticMessage(uint64_t pageID, const String& message, const String& description);
-    void logDiagnosticMessageWithResult(uint64_t pageID, const String& message, const String& description, uint32_t result);
-    void logDiagnosticMessageWithValue(uint64_t pageID, const String& message, const String& description, const String& value);
 
     // ProcessLauncher::Client
     virtual void didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier) override;
index e9d8cf6..93a37b4 100644 (file)
@@ -28,11 +28,6 @@ messages -> NetworkProcessProxy LegacyReceiver {
     DidReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID)
 
     DidDeleteWebsiteData(uint64_t callbackID)
-
-    # Diagnostic messages logging
-    LogDiagnosticMessage(uint64_t pageID, String message, String description)
-    LogDiagnosticMessageWithResult(uint64_t pageID, String message, String description, uint32_t result)
-    LogDiagnosticMessageWithValue(uint64_t pageID, String message, String description, String value)
 }
 
 #endif // ENABLE(NETWORK_PROCESS)
index c92ca89..24d9e2f 100644 (file)
@@ -988,11 +988,6 @@ public:
 
     void setShouldDispatchFakeMouseMoveEvents(bool);
 
-    // Diagnostic messages logging.
-    void logDiagnosticMessage(const String& message, const String& description);
-    void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result);
-    void logDiagnosticMessageWithValue(const String& message, const String& description, const String& value);
-
 private:
     WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, const WebPageConfiguration&);
     void platformInitialize();
@@ -1242,6 +1237,11 @@ private:
     void setCursor(const WebCore::Cursor&);
     void setCursorHiddenUntilMouseMoves(bool);
 
+    // Diagnostic messages logging.
+    void logDiagnosticMessage(const String& message, const String& description);
+    void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result);
+    void logDiagnosticMessageWithValue(const String& message, const String& description, const String& value);
+
     void didReceiveEvent(uint32_t opaqueType, bool handled);
     void stopResponsivenessTimer();