⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 179919 in webkit


Ignore:
Timestamp:
Feb 11, 2015, 12:01:19 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

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

Location:
trunk/Source
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r179917 r179919  
     12015-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
    1152015-02-10  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebCore/WebCore.exp.in

    r179910 r179919  
    946946__ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_19IDBDatabaseMetadataEE4copyERKS1_
    947947__ZN7WebCore21DiagnosticLoggingKeys10webViewKeyEv
    948 __ZN7WebCore21DiagnosticLoggingKeys12retrievalKeyEv
    949 __ZN7WebCore21DiagnosticLoggingKeys15networkCacheKeyEv
    950 __ZN7WebCore21DiagnosticLoggingKeys25noLongerInCacheFailureKeyEv
    951 __ZN7WebCore21DiagnosticLoggingKeys26unhandledRequestFailureKeyEv
    952 __ZN7WebCore21DiagnosticLoggingKeys29unusableCachedEntryFailureKeyEv
    953948__ZN7WebCore21DiagnosticLoggingKeys7userKeyEv
    954949__ZN7WebCore21DiagnosticLoggingKeys9zoomedKeyEv
  • trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp

    r179910 r179919  
    104104}
    105105
    106 String DiagnosticLoggingKeys::networkCacheKey()
    107 {
    108     return ASCIILiteral("networkCache");
    109 }
    110 
    111106String DiagnosticLoggingKeys::networkKey()
    112107{
     
    139134}
    140135
    141 String DiagnosticLoggingKeys::noLongerInCacheFailureKey()
    142 {
    143     return ASCIILiteral("noLongerInCacheFailure");
    144 }
    145 
    146136String DiagnosticLoggingKeys::otherKey()
    147137{
     
    309299}
    310300
    311 String DiagnosticLoggingKeys::retrievalKey()
    312 {
    313     return ASCIILiteral("retrieval");
    314 }
    315 
    316301String DiagnosticLoggingKeys::revalidatingKey()
    317302{
     
    349334}
    350335
    351 String DiagnosticLoggingKeys::unhandledRequestFailureKey()
    352 {
    353     return ASCIILiteral("unhandledRequestFailure");
    354 }
    355 
    356 String DiagnosticLoggingKeys::unusableCachedEntryFailureKey()
    357 {
    358     return ASCIILiteral("unusableCachedEntryFailure");
    359 }
    360 
    361336String DiagnosticLoggingKeys::unusedKey()
    362337{
  • trunk/Source/WebCore/page/DiagnosticLoggingKeys.h

    r179910 r179919  
    6464    static String mustRevalidateIsExpiredKey();
    6565    static String navigationKey();
    66     WEBCORE_EXPORT static String networkCacheKey();
    6766    static String networkKey();
    6867    static String noCacheKey();
    6968    static String noCurrentHistoryItemKey();
    7069    static String noDocumentLoaderKey();
    71     WEBCORE_EXPORT static String noLongerInCacheFailureKey();
    7270    static String noStoreKey();
    7371    static String notInMemoryCacheKey();
     
    9391    static String resourceRequestKey();
    9492    static String resourceResponseKey();
    95     WEBCORE_EXPORT static String retrievalKey();
    9693    static String revalidatingKey();
    9794    static String sameLoadKey();
     
    10097    static String styleSheetKey();
    10198    static String svgDocumentKey();
    102     WEBCORE_EXPORT static String unhandledRequestFailureKey();
    103     WEBCORE_EXPORT static String unusableCachedEntryFailureKey();
    10499    static String unusedKey();
    105100    static String unusedReasonCredentialSettingsKey();
  • trunk/Source/WebCore/platform/sql/SQLiteDatabaseTracker.h

    r179910 r179919  
    3939
    4040#if !ASSERT_DISABLED
    41 WEBCORE_EXPORT bool hasTransactionInProgress();
     41bool hasTransactionInProgress();
    4242#endif
    4343
  • trunk/Source/WebKit2/ChangeLog

    r179910 r179919  
     12015-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
    1152015-02-10  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp

    r179910 r179919  
    302302}
    303303
    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 
    319304void NetworkProcess::terminate()
    320305{
  • trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h

    r179910 r179919  
    3434#include "MessageReceiverMap.h"
    3535#include "NetworkResourceLoadScheduler.h"
    36 #include <WebCore/DiagnosticLoggingResultType.h>
    3736#include <WebCore/SessionID.h>
    3837#include <memory>
     
    7675    DownloadManager& downloadManager();
    7776    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);
    8377
    8478private:
  • trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp

    r179910 r179919  
    142142
    143143    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) {
    145145        if (loader->hasOneRef()) {
    146146            // The loader has been aborted and is only held alive by this lambda.
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp

    r179910 r179919  
    219219}
    220220
    221 void NetworkCache::retrieve(const WebCore::ResourceRequest& originalRequest, uint64_t webPageID, std::function<void (std::unique_ptr<Entry>)> completionHandler)
     221void NetworkCache::retrieve(const WebCore::ResourceRequest& originalRequest, std::function<void (std::unique_ptr<Entry>)> completionHandler)
    222222{
    223223    ASSERT(isEnabled());
     
    228228    if (!canRetrieve(originalRequest)) {
    229229        if (m_statistics)
    230             m_statistics->recordNotUsingCacheForRequest(webPageID, storageKey, originalRequest);
     230            m_statistics->recordNotUsingCacheForRequest(storageKey, originalRequest);
    231231
    232232        completionHandler(nullptr);
     
    237237    unsigned priority = originalRequest.priority();
    238238
    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) {
    240240        if (!entry) {
    241241            LOG(NetworkCache, "(NetworkProcess) not found in storage");
    242242
    243243            if (m_statistics)
    244                 m_statistics->recordRetrievalFailure(webPageID, storageKey, originalRequest);
     244                m_statistics->recordRetrievalFailure(storageKey, originalRequest);
    245245
    246246            completionHandler(nullptr);
     
    250250        bool success = !!decodedEntry;
    251251        if (m_statistics)
    252             m_statistics->recordRetrievedCachedEntry(webPageID, storageKey, originalRequest, success);
     252            m_statistics->recordRetrievedCachedEntry(storageKey, originalRequest, success);
    253253
    254254#if !LOG_DISABLED
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h

    r179910 r179919  
    6565    };
    6666    // 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>)>);
    6868
    6969    struct MappedBody {
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.h

    r179910 r179919  
    4545    void clear();
    4646
    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);
    5050
    5151private:
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm

    r179910 r179919  
    3232#include "NetworkCache.h"
    3333#include "NetworkCacheFileSystemPosix.h"
    34 #include "NetworkProcess.h"
    35 #include <WebCore/DiagnosticLoggingKeys.h>
    36 #include <WebCore/DiagnosticLoggingResultType.h>
    3734#include <WebCore/ResourceRequest.h>
    3835#include <WebCore/SQLiteDatabaseTracker.h>
     
    169166}
    170167
    171 void NetworkCacheStatistics::recordNotUsingCacheForRequest(uint64_t webPageID, const NetworkCacheKey& key, const WebCore::ResourceRequest& request)
     168void NetworkCacheStatistics::recordNotUsingCacheForRequest(const NetworkCacheKey& key, const WebCore::ResourceRequest& request)
    172169{
    173170    String hash = key.hashAsString();
    174171    WebCore::URL requestURL = request.url();
    175     queryWasEverRequested(hash, [this, hash, requestURL, webPageID](bool wasEverRequested) {
     172    queryWasEverRequested(hash, [this, hash, requestURL](bool wasEverRequested) {
    176173        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.
    179176        } else
    180177            markAsRequested(hash);
     
    182179}
    183180
    184 void NetworkCacheStatistics::recordRetrievalFailure(uint64_t webPageID, const NetworkCacheKey& key, const WebCore::ResourceRequest& request)
     181void NetworkCacheStatistics::recordRetrievalFailure(const NetworkCacheKey& key, const WebCore::ResourceRequest& request)
    185182{
    186183    String hash = key.hashAsString();
    187184    WebCore::URL requestURL = request.url();
    188     queryWasEverRequested(hash, [this, hash, requestURL, webPageID](bool wasPreviouslyRequested) {
     185    queryWasEverRequested(hash, [this, hash, requestURL](bool wasPreviouslyRequested) {
    189186        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.
    192189        } else
    193190            markAsRequested(hash);
     
    195192}
    196193
    197 void NetworkCacheStatistics::recordRetrievedCachedEntry(uint64_t webPageID, const NetworkCacheKey& key, const WebCore::ResourceRequest& request, bool success)
     194void NetworkCacheStatistics::recordRetrievedCachedEntry(const NetworkCacheKey& key, const WebCore::ResourceRequest& request, bool success)
    198195{
    199196    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.
    207202}
    208203
  • trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp

    r179910 r179919  
    231231}
    232232
    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 
    257233} // namespace WebKit
    258234
  • trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h

    r179910 r179919  
    9292    void didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, const WebCore::AuthenticationChallenge&, uint64_t challengeID);
    9393    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);
    9794
    9895    // ProcessLauncher::Client
  • trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.messages.in

    r179910 r179919  
    2929
    3030    DidDeleteWebsiteData(uint64_t callbackID)
    31 
    32     # Diagnostic messages logging
    33     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)
    3631}
    3732
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r179910 r179919  
    989989    void setShouldDispatchFakeMouseMoveEvents(bool);
    990990
    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 
    996991private:
    997992    WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, const WebPageConfiguration&);
     
    12431238    void setCursorHiddenUntilMouseMoves(bool);
    12441239
     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
    12451245    void didReceiveEvent(uint32_t opaqueType, bool handled);
    12461246    void stopResponsivenessTimer();
Note: See TracChangeset for help on using the changeset viewer.