Changeset 254592 in webkit


Ignore:
Timestamp:
Jan 15, 2020 11:14:53 AM (4 years ago)
Author:
Alan Coon
Message:

Cherry-pick r254147. rdar://problem/58549096

Reformat WebFrameLoaderClient logging
https://bugs.webkit.org/show_bug.cgi?id=205869
<rdar://problem/58379240>

Reviewed by Brent Fulgham.

Update the format used by WebFrameLoaderClient in its RELEASE_LOG
logging. Use the format used by WebPageProxy and
NetworkResourceLoader, which is generally of the form:

<object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

So, for example:

0x4a1d7c310 - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = 0x7f83ba009208

becomes:

0x4a1d7c310 - [webFrame=0x7ff703f03b68, webFrameID=3, webPage=0x7ff704831808, webPageID=15] WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition

No new tests - no added or changed functionality.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad): (WebKit::WebFrameLoaderClient::dispatchDidFailLoad): (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):

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

Location:
branches/safari-609-branch/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-609-branch/Source/WebKit/ChangeLog

    r254588 r254592  
     12020-01-14  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r254147. rdar://problem/58549096
     4
     5    Reformat WebFrameLoaderClient logging
     6    https://bugs.webkit.org/show_bug.cgi?id=205869
     7    <rdar://problem/58379240>
     8   
     9    Reviewed by Brent Fulgham.
     10   
     11    Update the format used by WebFrameLoaderClient in its RELEASE_LOG
     12    logging. Use the format used by WebPageProxy and
     13    NetworkResourceLoader, which is generally of the form:
     14   
     15        <object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>
     16   
     17    So, for example:
     18   
     19        0x4a1d7c310 - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = 0x7f83ba009208
     20   
     21    becomes:
     22   
     23        0x4a1d7c310 - [webFrame=0x7ff703f03b68, webFrameID=3, webPage=0x7ff704831808, webPageID=15] WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition
     24   
     25    No new tests - no added or changed functionality.
     26   
     27    * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     28    (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
     29    (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
     30    (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
     31    (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
     32   
     33   
     34    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     35
     36    2020-01-07  Keith Rollin  <krollin@apple.com>
     37
     38            Reformat WebFrameLoaderClient logging
     39            https://bugs.webkit.org/show_bug.cgi?id=205869
     40            <rdar://problem/58379240>
     41
     42            Reviewed by Brent Fulgham.
     43
     44            Update the format used by WebFrameLoaderClient in its RELEASE_LOG
     45            logging. Use the format used by WebPageProxy and
     46            NetworkResourceLoader, which is generally of the form:
     47
     48                <object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>
     49
     50            So, for example:
     51
     52                0x4a1d7c310 - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = 0x7f83ba009208
     53
     54            becomes:
     55
     56                0x4a1d7c310 - [webFrame=0x7ff703f03b68, webFrameID=3, webPage=0x7ff704831808, webPageID=15] WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition
     57
     58            No new tests - no added or changed functionality.
     59
     60            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     61            (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
     62            (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
     63            (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
     64            (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
     65
    1662020-01-14  Alan Coon  <alancoon@apple.com>
    267
  • branches/safari-609-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r253634 r254592  
    9797#include <wtf/ProcessPrivilege.h>
    9898
     99#define PREFIX_PARAMETERS "%p - [webFrame=%p, webFrameID=%" PRIu64 ", webPage=%p, webPageID=%" PRIu64 "] WebFrameLoaderClient::"
     100#define WEBFRAME (webFrame())
     101#define WEBFRAMEID (WEBFRAME ? WEBFRAME->frameID().toUInt64() : 0)
     102#define WEBPAGE (WEBFRAME ? WEBFRAME->page() : nullptr)
     103#define WEBPAGEID (WEBPAGE ? WEBPAGE->identifier().toUInt64() : 0)
     104
     105#define WEBFRAMELOADERCLIENT_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, PREFIX_PARAMETERS fmt, this, WEBFRAME, WEBFRAMEID, WEBPAGE, WEBPAGEID, ##__VA_ARGS__)
     106#define WEBFRAMELOADERCLIENT_RELEASE_LOG_ERROR(channel, fmt, ...) RELEASE_LOG_ERROR(channel, PREFIX_PARAMETERS fmt, this, WEBFRAME, WEBFRAMEID, WEBPAGE, WEBPAGEID, ##__VA_ARGS__)
     107#define WEBFRAMELOADERCLIENT_RELEASE_LOG_FAULT(channel, fmt, ...) RELEASE_LOG_FAULT(channel, PREFIX_PARAMETERS fmt, this, WEBFRAME, WEBFRAMEID, WEBPAGE, WEBPAGEID, ##__VA_ARGS__)
     108
    99109namespace WebKit {
    100110using namespace WebCore;
     
    327337    WebDocumentLoader* documentLoader = static_cast<WebDocumentLoader*>(m_frame->coreFrame()->loader().provisionalDocumentLoader());
    328338    if (!documentLoader) {
    329         RELEASE_LOG_FAULT(Loading, "WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad called with no provisional DocumentLoader. FrameState is %i. FrameLoaderStateMachine stateForDebugging - %i", m_frame->coreFrame()->loader().state(), m_frame->coreFrame()->loader().stateMachine().stateForDebugging());
     339        WEBFRAMELOADERCLIENT_RELEASE_LOG_FAULT(Loading, "dispatchDidReceiveServerRedirectForProvisionalLoad: Called with no provisional DocumentLoader (frameState=%i, stateForDebugging=%i)", m_frame->coreFrame()->loader().state(), m_frame->coreFrame()->loader().stateMachine().stateForDebugging());
    330340        return;
    331341    }
     
    561571        return;
    562572
    563     RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailProvisionalLoad: (webPageID=%" PRIu64 ", frameID=%" PRIu64 ")", this, webPage->identifier().toUInt64(), m_frame->frameID().toUInt64());
     573    WEBFRAMELOADERCLIENT_RELEASE_LOG(Network, "dispatchDidFailProvisionalLoad:");
    564574
    565575    RefPtr<API::Object> userData;
     
    597607        return;
    598608
    599     RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailLoad: (webPageID=%" PRIu64 ", frameID=%" PRIu64 ")", this, webPage->identifier().toUInt64(), m_frame->frameID().toUInt64());
     609    WEBFRAMELOADERCLIENT_RELEASE_LOG(Network, "dispatchDidFailLoad:");
    600610
    601611    RefPtr<API::Object> userData;
     
    678688
    679689    if (milestones & DidFirstLayout) {
    680         RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching DidFirstLayoutForFrame, page = %p", this, webPage);
     690        WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching DidFirstLayoutForFrame");
    681691
    682692        // FIXME: We should consider removing the old didFirstLayout API since this is doing double duty with the
     
    688698        // FIXME: Do this on DidFirstVisuallyNonEmptyLayout when Mac Safari is able to handle it (<rdar://problem/17580021>)
    689699        if (m_frame->isMainFrame() && !m_didCompletePageTransition && !webPage->corePage()->settings().suppressesIncrementalRendering()) {
    690             RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = %p", this, webPage);
     700            WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition");
    691701            webPage->didCompletePageTransition();
    692702            m_didCompletePageTransition = true;
     
    720730    addIfSet(DidFirstMeaningfulPaint, "DidFirstMeaningfulPaint"_s);
    721731
    722     RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching DidReachLayoutMilestone, page = %p, milestones = %{public}s", this, webPage, builder.toString().utf8().data());
     732    WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching DidReachLayoutMilestone (milestones=%{public}s)", builder.toString().utf8().data());
    723733#endif
    724734
     
    728738    if (milestones & DidFirstVisuallyNonEmptyLayout) {
    729739        if (m_frame->isMainFrame() && !m_didCompletePageTransition && !webPage->corePage()->settings().suppressesIncrementalRendering()) {
    730             RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = %p", this, webPage);
     740            WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition");
    731741            webPage->didCompletePageTransition();
    732742            m_didCompletePageTransition = true;
     
    735745        // FIXME: We should consider removing the old didFirstVisuallyNonEmptyLayoutForFrame API since this is doing
    736746        // double duty with the new didLayout API.
    737         RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching DidFirstVisuallyNonEmptyLayoutForFrame, page = %p", this, webPage);
     747        WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching DidFirstVisuallyNonEmptyLayoutForFrame");
    738748        webPage->injectedBundleLoaderClient().didFirstVisuallyNonEmptyLayoutForFrame(*webPage, *m_frame, userData);
    739749        webPage->send(Messages::WebPageProxy::DidFirstVisuallyNonEmptyLayoutForFrame(m_frame->frameID(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
     
    19241934
    19251935} // namespace WebKit
     1936
     1937#undef PREFIX_PARAMETERS
     1938#undef WEBFRAME
     1939#undef WEBFRAMEID
     1940#undef WEBPAGE
     1941#undef WEBPAGEID
Note: See TracChangeset for help on using the changeset viewer.