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

Changeset 254033 in webkit


Ignore:
Timestamp:
Jan 4, 2020, 10:23:08 AM (7 years ago)
Author:
Keith Rollin
Message:

Reformat WebPage logging
​https://bugs.webkit.org/show_bug.cgi?id=205705
<rdar://problem/58288704>

Reviewed by Alex Christensen.

Update the format used by WebPage 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:

0x7f83ba009208 - WebPage (webPageID=15) - Adding a reason 1 to freeze layer tree (now 1); old reasons were 0

becomes:

0x7f83ba009208 - [webPageID=15] WebPage::freezeLayerTree: Adding a reason to freeze layer tree (reason=1, new=1, old=0)

No new tests - no added or changed functionality.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_overriddenMediaType):
(WebKit::WebPage::createPlugin):
(WebKit::WebPage::freezeLayerTree):
(WebKit::WebPage::unfreezeLayerTree):
(WebKit::WebPage::markLayersVolatile):
(WebKit::WebPage::cancelMarkLayersVolatile):
(WebKit::WebPage::touchEventSync):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r254029 r254033  
     12020-01-04  Keith Rollin  <krollin@apple.com>
     2
     3        Reformat WebPage logging
     4        https://bugs.webkit.org/show_bug.cgi?id=205705
     5        <rdar://problem/58288704>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Update the format used by WebPage in its RELEASE_LOG logging. Use the
     10        format used by WebPageProxy and NetworkResourceLoader, which is
     11        generally of the form:
     12
     13            <object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>
     14
     15        So, for example:
     16
     17            0x7f83ba009208 - WebPage (webPageID=15) - Adding a reason 1 to freeze layer tree (now 1); old reasons were 0
     18
     19        becomes:
     20
     21            0x7f83ba009208 - [webPageID=15] WebPage::freezeLayerTree: Adding a reason to freeze layer tree (reason=1, new=1, old=0)
     22
     23        No new tests - no added or changed functionality.
     24
     25        * WebProcess/WebPage/WebPage.cpp:
     26        (WebKit::m_overriddenMediaType):
     27        (WebKit::WebPage::createPlugin):
     28        (WebKit::WebPage::freezeLayerTree):
     29        (WebKit::WebPage::unfreezeLayerTree):
     30        (WebKit::WebPage::markLayersVolatile):
     31        (WebKit::WebPage::cancelMarkLayersVolatile):
     32        (WebKit::WebPage::touchEventSync):
     33
    1342020-01-03  Chris Dumez  <cdumez@apple.com>
    235
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r254029 r254033  
    326326static const Seconds maximumLayerVolatilityTimerInterval { 2_s };
    327327
    328 #define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), channel, "%p - WebPage::" fmt, this, ##__VA_ARGS__)
    329 #define RELEASE_LOG_ERROR_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), channel, "%p - WebPage::" fmt, this, ##__VA_ARGS__)
     328#define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [webPageID=%" PRIu64 "] WebPage::" fmt, this, m_identifier.toUInt64(), ##__VA_ARGS__)
     329#define RELEASE_LOG_ERROR_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [webPageID=%" PRIu64 "] WebPage::" fmt, this, m_identifier.toUInt64(), ##__VA_ARGS__)
    330330
    331331class SendStopResponsivenessTimer {
    … …  
    703703        m_canShowWhileLocked
    704704    });
    705     RELEASE_LOG(Process, "Created context with ID %d for visibility propagation from UIProcess", m_contextForVisibilityPropagation->contextID());
     705    RELEASE_LOG_IF_ALLOWED(Process, "WebPage: Created context with ID %d for visibility propagation from UIProcess", m_contextForVisibilityPropagation->contextID());
    706706    send(Messages::WebPageProxy::DidCreateContextForVisibilityPropagation(m_contextForVisibilityPropagation->contextID()));
    707707#endif
    … …  
    10011001
    10021002    if (m_page->settings().blockingOfSmallPluginsEnabled() && pluginIsSmall(*pluginElement)) {
    1003         RELEASE_LOG(Plugins, "Blocking a plugin because it is too small");
     1003        RELEASE_LOG_IF_ALLOWED(Plugins, "createPlugin: Blocking a plugin because it is too small");
    10041004        pluginElement->setReplacement(RenderEmbeddedObject::PluginTooSmall, pluginTooSmallText());
    10051005        return nullptr;
    … …  
    25272527    UNUSED_PARAM(oldReasons);
    25282528    m_layerTreeFreezeReasons.add(reason);
    2529     RELEASE_LOG(ProcessSuspension, "%p - WebPage (webPageID=%llu) - Adding a reason %d to freeze layer tree (now %d); old reasons were %d", this, m_identifier.toUInt64(), static_cast<unsigned>(reason), m_layerTreeFreezeReasons.toRaw(), oldReasons);
     2529    RELEASE_LOG_IF_ALLOWED(ProcessSuspension, "freezeLayerTree: Adding a reason to freeze layer tree (reason=%d, new=%d, old=%d)", static_cast<unsigned>(reason), m_layerTreeFreezeReasons.toRaw(), oldReasons);
    25302530    updateDrawingAreaLayerTreeFreezeState();
    25312531}
    … …  
    25362536    UNUSED_PARAM(oldReasons);
    25372537    m_layerTreeFreezeReasons.remove(reason);
    2538     RELEASE_LOG(ProcessSuspension, "%p - WebPage (webPageID=%llu) - Removing a reason %d to freeze layer tree (now %d); old reasons were %d", this, m_identifier.toUInt64(), static_cast<unsigned>(reason), m_layerTreeFreezeReasons.toRaw(), oldReasons);
     2538    RELEASE_LOG_IF_ALLOWED(ProcessSuspension, "unfreezeLayerTree: Removing a reason to freeze layer tree (reason=%d, new=%d, old=%d)", static_cast<unsigned>(reason), m_layerTreeFreezeReasons.toRaw(), oldReasons);
    25392539    updateDrawingAreaLayerTreeFreezeState();
    25402540}
    … …  
    25792579void WebPage::markLayersVolatile(WTF::Function<void (bool)>&& completionHandler)
    25802580{
    2581     RELEASE_LOG_IF_ALLOWED(Layers, "markLayersVolatile");
     2581    RELEASE_LOG_IF_ALLOWED(Layers, "markLayersVolatile:");
    25822582
    25832583    if (m_layerVolatilityTimer.isActive())
    … …  
    26052605void WebPage::cancelMarkLayersVolatile()
    26062606{
    2607     RELEASE_LOG_IF_ALLOWED(Layers, "cancelMarkLayersVolatile");
     2607    RELEASE_LOG_IF_ALLOWED(Layers, "cancelMarkLayersVolatile:");
    26082608    m_layerVolatilityTimer.stop();
    26092609    m_markLayersAsVolatileCompletionHandlers.clear();
    … …  
    29132913    // Avoid UIProcess hangs when the WebContent process is stuck on a sync IPC.
    29142914    if (IPC::UnboundedSynchronousIPCScope::hasOngoingUnboundedSyncIPC()) {
    2915         RELEASE_LOG_ERROR_IF_ALLOWED(Process, "touchEventSync - Not processing because the process is stuck on unbounded sync IPC");
     2915        RELEASE_LOG_ERROR_IF_ALLOWED(Process, "touchEventSync: Not processing because the process is stuck on unbounded sync IPC");
    29162916        return reply(true);
    29172917    }
Note: See TracChangeset for help on using the changeset viewer.