Changeset 179919 in webkit
- Timestamp:
- Feb 11, 2015, 12:01:19 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 17 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/WebCore.exp.in (modified) (1 diff)
-
WebCore/page/DiagnosticLoggingKeys.cpp (modified) (4 diffs)
-
WebCore/page/DiagnosticLoggingKeys.h (modified) (3 diffs)
-
WebCore/platform/sql/SQLiteDatabaseTracker.h (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/NetworkProcess/NetworkProcess.cpp (modified) (1 diff)
-
WebKit2/NetworkProcess/NetworkProcess.h (modified) (2 diffs)
-
WebKit2/NetworkProcess/NetworkResourceLoader.cpp (modified) (1 diff)
-
WebKit2/NetworkProcess/cache/NetworkCache.cpp (modified) (4 diffs)
-
WebKit2/NetworkProcess/cache/NetworkCache.h (modified) (1 diff)
-
WebKit2/NetworkProcess/cache/NetworkCacheStatistics.h (modified) (1 diff)
-
WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm (modified) (4 diffs)
-
WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (modified) (1 diff)
-
WebKit2/UIProcess/Network/NetworkProcessProxy.h (modified) (1 diff)
-
WebKit2/UIProcess/Network/NetworkProcessProxy.messages.in (modified) (1 diff)
-
WebKit2/UIProcess/WebPageProxy.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r179917 r179919 1 2015-02-11 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r179910. 4 https://bugs.webkit.org/show_bug.cgi?id=141464 5 6 Caused assertions on debug bots (Requested by ap on #webkit). 7 8 Reverted changeset: 9 10 "[WK2] Add logging to validate the network cache efficacy 11 (Part 2)" 12 https://bugs.webkit.org/show_bug.cgi?id=141345 13 http://trac.webkit.org/changeset/179910 14 1 15 2015-02-10 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/WebCore.exp.in
r179910 r179919 946 946 __ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_19IDBDatabaseMetadataEE4copyERKS1_ 947 947 __ZN7WebCore21DiagnosticLoggingKeys10webViewKeyEv 948 __ZN7WebCore21DiagnosticLoggingKeys12retrievalKeyEv949 __ZN7WebCore21DiagnosticLoggingKeys15networkCacheKeyEv950 __ZN7WebCore21DiagnosticLoggingKeys25noLongerInCacheFailureKeyEv951 __ZN7WebCore21DiagnosticLoggingKeys26unhandledRequestFailureKeyEv952 __ZN7WebCore21DiagnosticLoggingKeys29unusableCachedEntryFailureKeyEv953 948 __ZN7WebCore21DiagnosticLoggingKeys7userKeyEv 954 949 __ZN7WebCore21DiagnosticLoggingKeys9zoomedKeyEv -
trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp
r179910 r179919 104 104 } 105 105 106 String DiagnosticLoggingKeys::networkCacheKey()107 {108 return ASCIILiteral("networkCache");109 }110 111 106 String DiagnosticLoggingKeys::networkKey() 112 107 { … … 139 134 } 140 135 141 String DiagnosticLoggingKeys::noLongerInCacheFailureKey()142 {143 return ASCIILiteral("noLongerInCacheFailure");144 }145 146 136 String DiagnosticLoggingKeys::otherKey() 147 137 { … … 309 299 } 310 300 311 String DiagnosticLoggingKeys::retrievalKey()312 {313 return ASCIILiteral("retrieval");314 }315 316 301 String DiagnosticLoggingKeys::revalidatingKey() 317 302 { … … 349 334 } 350 335 351 String DiagnosticLoggingKeys::unhandledRequestFailureKey()352 {353 return ASCIILiteral("unhandledRequestFailure");354 }355 356 String DiagnosticLoggingKeys::unusableCachedEntryFailureKey()357 {358 return ASCIILiteral("unusableCachedEntryFailure");359 }360 361 336 String DiagnosticLoggingKeys::unusedKey() 362 337 { -
trunk/Source/WebCore/page/DiagnosticLoggingKeys.h
r179910 r179919 64 64 static String mustRevalidateIsExpiredKey(); 65 65 static String navigationKey(); 66 WEBCORE_EXPORT static String networkCacheKey();67 66 static String networkKey(); 68 67 static String noCacheKey(); 69 68 static String noCurrentHistoryItemKey(); 70 69 static String noDocumentLoaderKey(); 71 WEBCORE_EXPORT static String noLongerInCacheFailureKey();72 70 static String noStoreKey(); 73 71 static String notInMemoryCacheKey(); … … 93 91 static String resourceRequestKey(); 94 92 static String resourceResponseKey(); 95 WEBCORE_EXPORT static String retrievalKey();96 93 static String revalidatingKey(); 97 94 static String sameLoadKey(); … … 100 97 static String styleSheetKey(); 101 98 static String svgDocumentKey(); 102 WEBCORE_EXPORT static String unhandledRequestFailureKey();103 WEBCORE_EXPORT static String unusableCachedEntryFailureKey();104 99 static String unusedKey(); 105 100 static String unusedReasonCredentialSettingsKey(); -
trunk/Source/WebCore/platform/sql/SQLiteDatabaseTracker.h
r179910 r179919 39 39 40 40 #if !ASSERT_DISABLED 41 WEBCORE_EXPORTbool hasTransactionInProgress();41 bool hasTransactionInProgress(); 42 42 #endif 43 43 -
trunk/Source/WebKit2/ChangeLog
r179910 r179919 1 2015-02-11 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r179910. 4 https://bugs.webkit.org/show_bug.cgi?id=141464 5 6 Caused assertions on debug bots (Requested by ap on #webkit). 7 8 Reverted changeset: 9 10 "[WK2] Add logging to validate the network cache efficacy 11 (Part 2)" 12 https://bugs.webkit.org/show_bug.cgi?id=141345 13 http://trac.webkit.org/changeset/179910 14 1 15 2015-02-10 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp
r179910 r179919 302 302 } 303 303 304 void NetworkProcess::logDiagnosticMessage(uint64_t webPageID, const String& message, const String& description)305 {306 parentProcessConnection()->send(Messages::NetworkProcessProxy::LogDiagnosticMessage(webPageID, message, description), 0);307 }308 309 void NetworkProcess::logDiagnosticMessageWithResult(uint64_t webPageID, const String& message, const String& description, WebCore::DiagnosticLoggingResultType result)310 {311 parentProcessConnection()->send(Messages::NetworkProcessProxy::LogDiagnosticMessageWithResult(webPageID, message, description, result), 0);312 }313 314 void NetworkProcess::logDiagnosticMessageWithValue(uint64_t webPageID, const String& message, const String& description, const String& value)315 {316 parentProcessConnection()->send(Messages::NetworkProcessProxy::LogDiagnosticMessageWithValue(webPageID, message, description, value), 0);317 }318 319 304 void NetworkProcess::terminate() 320 305 { -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h
r179910 r179919 34 34 #include "MessageReceiverMap.h" 35 35 #include "NetworkResourceLoadScheduler.h" 36 #include <WebCore/DiagnosticLoggingResultType.h>37 36 #include <WebCore/SessionID.h> 38 37 #include <memory> … … 76 75 DownloadManager& downloadManager(); 77 76 bool canHandleHTTPSServerTrustEvaluation() const { return m_canHandleHTTPSServerTrustEvaluation; } 78 79 // Diagnostic messages logging.80 void logDiagnosticMessage(uint64_t webPageID, const String& message, const String& description);81 void logDiagnosticMessageWithResult(uint64_t webPageID, const String& message, const String& description, WebCore::DiagnosticLoggingResultType);82 void logDiagnosticMessageWithValue(uint64_t webPageID, const String& message, const String& description, const String& value);83 77 84 78 private: -
trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
r179910 r179919 142 142 143 143 RefPtr<NetworkResourceLoader> loader(this); 144 NetworkCache::singleton().retrieve(originalRequest(), m_parameters.webPageID,[loader](std::unique_ptr<NetworkCache::Entry> entry) {144 NetworkCache::singleton().retrieve(originalRequest(), [loader](std::unique_ptr<NetworkCache::Entry> entry) { 145 145 if (loader->hasOneRef()) { 146 146 // The loader has been aborted and is only held alive by this lambda. -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp
r179910 r179919 219 219 } 220 220 221 void NetworkCache::retrieve(const WebCore::ResourceRequest& originalRequest, uint64_t webPageID,std::function<void (std::unique_ptr<Entry>)> completionHandler)221 void NetworkCache::retrieve(const WebCore::ResourceRequest& originalRequest, std::function<void (std::unique_ptr<Entry>)> completionHandler) 222 222 { 223 223 ASSERT(isEnabled()); … … 228 228 if (!canRetrieve(originalRequest)) { 229 229 if (m_statistics) 230 m_statistics->recordNotUsingCacheForRequest( webPageID,storageKey, originalRequest);230 m_statistics->recordNotUsingCacheForRequest(storageKey, originalRequest); 231 231 232 232 completionHandler(nullptr); … … 237 237 unsigned priority = originalRequest.priority(); 238 238 239 m_storage->retrieve(storageKey, priority, [this, originalRequest, completionHandler, startTime, storageKey , webPageID](std::unique_ptr<NetworkCacheStorage::Entry> entry) {239 m_storage->retrieve(storageKey, priority, [this, originalRequest, completionHandler, startTime, storageKey](std::unique_ptr<NetworkCacheStorage::Entry> entry) { 240 240 if (!entry) { 241 241 LOG(NetworkCache, "(NetworkProcess) not found in storage"); 242 242 243 243 if (m_statistics) 244 m_statistics->recordRetrievalFailure( webPageID,storageKey, originalRequest);244 m_statistics->recordRetrievalFailure(storageKey, originalRequest); 245 245 246 246 completionHandler(nullptr); … … 250 250 bool success = !!decodedEntry; 251 251 if (m_statistics) 252 m_statistics->recordRetrievedCachedEntry( webPageID,storageKey, originalRequest, success);252 m_statistics->recordRetrievedCachedEntry(storageKey, originalRequest, success); 253 253 254 254 #if !LOG_DISABLED -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h
r179910 r179919 65 65 }; 66 66 // Completion handler may get called back synchronously on failure. 67 void retrieve(const WebCore::ResourceRequest&, uint64_t webPageID,std::function<void (std::unique_ptr<Entry>)>);67 void retrieve(const WebCore::ResourceRequest&, std::function<void (std::unique_ptr<Entry>)>); 68 68 69 69 struct MappedBody { -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.h
r179910 r179919 45 45 void clear(); 46 46 47 void recordNotUsingCacheForRequest( uint64_t webPageID,const NetworkCacheKey&, const WebCore::ResourceRequest&);48 void recordRetrievalFailure( uint64_t webPageID,const NetworkCacheKey&, const WebCore::ResourceRequest&);49 void recordRetrievedCachedEntry( uint64_t webPageID,const NetworkCacheKey&, const WebCore::ResourceRequest&, bool success);47 void recordNotUsingCacheForRequest(const NetworkCacheKey&, const WebCore::ResourceRequest&); 48 void recordRetrievalFailure(const NetworkCacheKey&, const WebCore::ResourceRequest&); 49 void recordRetrievedCachedEntry(const NetworkCacheKey&, const WebCore::ResourceRequest&, bool success); 50 50 51 51 private: -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm
r179910 r179919 32 32 #include "NetworkCache.h" 33 33 #include "NetworkCacheFileSystemPosix.h" 34 #include "NetworkProcess.h"35 #include <WebCore/DiagnosticLoggingKeys.h>36 #include <WebCore/DiagnosticLoggingResultType.h>37 34 #include <WebCore/ResourceRequest.h> 38 35 #include <WebCore/SQLiteDatabaseTracker.h> … … 169 166 } 170 167 171 void NetworkCacheStatistics::recordNotUsingCacheForRequest( uint64_t webPageID,const NetworkCacheKey& key, const WebCore::ResourceRequest& request)168 void NetworkCacheStatistics::recordNotUsingCacheForRequest(const NetworkCacheKey& key, const WebCore::ResourceRequest& request) 172 169 { 173 170 String hash = key.hashAsString(); 174 171 WebCore::URL requestURL = request.url(); 175 queryWasEverRequested(hash, [this, hash, requestURL , webPageID](bool wasEverRequested) {172 queryWasEverRequested(hash, [this, hash, requestURL](bool wasEverRequested) { 176 173 if (wasEverRequested) { 177 LOG(NetworkCache, "(NetworkProcess) webPageID %llu: %s was previously requested but is not handled by the cache", webPageID, requestURL.string().ascii().data());178 NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::retrievalKey(), WebCore::DiagnosticLoggingKeys::unhandledRequestFailureKey());174 LOG(NetworkCache, "(NetworkProcess) %s was previously requested but is not handled by the cache", requestURL.string().ascii().data()); 175 // FIXME: Do diagnostic logging. 179 176 } else 180 177 markAsRequested(hash); … … 182 179 } 183 180 184 void NetworkCacheStatistics::recordRetrievalFailure( uint64_t webPageID,const NetworkCacheKey& key, const WebCore::ResourceRequest& request)181 void NetworkCacheStatistics::recordRetrievalFailure(const NetworkCacheKey& key, const WebCore::ResourceRequest& request) 185 182 { 186 183 String hash = key.hashAsString(); 187 184 WebCore::URL requestURL = request.url(); 188 queryWasEverRequested(hash, [this, hash, requestURL , webPageID](bool wasPreviouslyRequested) {185 queryWasEverRequested(hash, [this, hash, requestURL](bool wasPreviouslyRequested) { 189 186 if (wasPreviouslyRequested) { 190 LOG(NetworkCache, "(NetworkProcess) webPageID %llu: %s was previously cached but is no longer in the cache", webPageID, requestURL.string().ascii().data());191 NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::retrievalKey(), WebCore::DiagnosticLoggingKeys::noLongerInCacheFailureKey());187 LOG(NetworkCache, "(NetworkProcess) %s was previously cached but is no longer in the cache", requestURL.string().ascii().data()); 188 // FIXME: Do diagnostic logging. 192 189 } else 193 190 markAsRequested(hash); … … 195 192 } 196 193 197 void NetworkCacheStatistics::recordRetrievedCachedEntry( uint64_t webPageID,const NetworkCacheKey& key, const WebCore::ResourceRequest& request, bool success)194 void NetworkCacheStatistics::recordRetrievedCachedEntry(const NetworkCacheKey& key, const WebCore::ResourceRequest& request, bool success) 198 195 { 199 196 WebCore::URL requestURL = request.url(); 200 if (success) { 201 LOG(NetworkCache, "(NetworkProcess) webPageID %llu: %s is in the cache and is used", webPageID, requestURL.string().ascii().data()); 202 NetworkProcess::singleton().logDiagnosticMessageWithResult(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::retrievalKey(), WebCore::DiagnosticLoggingResultPass); 203 } else { 204 LOG(NetworkCache, "(NetworkProcess) webPageID %llu: %s is in the cache but wasn't used", webPageID, requestURL.string().ascii().data()); 205 NetworkProcess::singleton().logDiagnosticMessageWithValue(webPageID, WebCore::DiagnosticLoggingKeys::networkCacheKey(), WebCore::DiagnosticLoggingKeys::retrievalKey(), WebCore::DiagnosticLoggingKeys::unusableCachedEntryFailureKey()); 206 } 197 if (success) 198 LOG(NetworkCache, "(NetworkProcess) %s is in the cache and is used", requestURL.string().ascii().data()); 199 else 200 LOG(NetworkCache, "(NetworkProcess) %s is in the cache but wasn't used", requestURL.string().ascii().data()); 201 // FIXME: Do diagnostic logging. 207 202 } 208 203 -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
r179910 r179919 231 231 } 232 232 233 void NetworkProcessProxy::logDiagnosticMessage(uint64_t pageID, const String& message, const String& description)234 {235 WebPageProxy* page = WebProcessProxy::webPage(pageID);236 MESSAGE_CHECK(page);237 238 page->logDiagnosticMessage(message, description);239 }240 241 void NetworkProcessProxy::logDiagnosticMessageWithResult(uint64_t pageID, const String& message, const String& description, uint32_t result)242 {243 WebPageProxy* page = WebProcessProxy::webPage(pageID);244 MESSAGE_CHECK(page);245 246 page->logDiagnosticMessageWithResult(message, description, result);247 }248 249 void NetworkProcessProxy::logDiagnosticMessageWithValue(uint64_t pageID, const String& message, const String& description, const String& value)250 {251 WebPageProxy* page = WebProcessProxy::webPage(pageID);252 MESSAGE_CHECK(page);253 254 page->logDiagnosticMessageWithValue(message, description, value);255 }256 257 233 } // namespace WebKit 258 234 -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h
r179910 r179919 92 92 void didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, const WebCore::AuthenticationChallenge&, uint64_t challengeID); 93 93 void didDeleteWebsiteData(uint64_t callbackID); 94 void logDiagnosticMessage(uint64_t pageID, const String& message, const String& description);95 void logDiagnosticMessageWithResult(uint64_t pageID, const String& message, const String& description, uint32_t result);96 void logDiagnosticMessageWithValue(uint64_t pageID, const String& message, const String& description, const String& value);97 94 98 95 // ProcessLauncher::Client -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.messages.in
r179910 r179919 29 29 30 30 DidDeleteWebsiteData(uint64_t callbackID) 31 32 # Diagnostic messages logging33 LogDiagnosticMessage(uint64_t pageID, String message, String description)34 LogDiagnosticMessageWithResult(uint64_t pageID, String message, String description, uint32_t result)35 LogDiagnosticMessageWithValue(uint64_t pageID, String message, String description, String value)36 31 } 37 32 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r179910 r179919 989 989 void setShouldDispatchFakeMouseMoveEvents(bool); 990 990 991 // Diagnostic messages logging.992 void logDiagnosticMessage(const String& message, const String& description);993 void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result);994 void logDiagnosticMessageWithValue(const String& message, const String& description, const String& value);995 996 991 private: 997 992 WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, const WebPageConfiguration&); … … 1243 1238 void setCursorHiddenUntilMouseMoves(bool); 1244 1239 1240 // Diagnostic messages logging. 1241 void logDiagnosticMessage(const String& message, const String& description); 1242 void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result); 1243 void logDiagnosticMessageWithValue(const String& message, const String& description, const String& value); 1244 1245 1245 void didReceiveEvent(uint32_t opaqueType, bool handled); 1246 1246 void stopResponsivenessTimer();
Note:
See TracChangeset
for help on using the changeset viewer.