Changeset 293893 in webkit


Ignore:
Timestamp:
May 6, 2022 8:58:40 AM (2 years ago)
Author:
pvollan@apple.com
Message:

Create reports for long process launch times
https://bugs.webkit.org/show_bug.cgi?id=240127

Reviewed by Yusuke Suzuki.

We have reports that it can take a long time to launch WebKit processes in some cases. This is the time
it takes from the XPC message is sent until the XPC reply is received. Add reporting when this happens
in order to help diagnose the issue.

  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::connect):
(WebKit::AuxiliaryProcessProxy::didFinishLaunching):

  • UIProcess/AuxiliaryProcessProxy.h:
Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r293892 r293893  
     12022-05-06  Per Arne Vollan  <pvollan@apple.com>
     2
     3        Create reports for long process launch times
     4        https://bugs.webkit.org/show_bug.cgi?id=240127
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        We have reports that it can take a long time to launch WebKit processes in some cases. This is the time
     9        it takes from the XPC message is sent until the XPC reply is received. Add reporting when this happens
     10        in order to help diagnose the issue.
     11       
     12        * UIProcess/AuxiliaryProcessProxy.cpp:
     13        (WebKit::AuxiliaryProcessProxy::connect):
     14        (WebKit::AuxiliaryProcessProxy::didFinishLaunching):
     15        * UIProcess/AuxiliaryProcessProxy.h:
     16
    1172022-05-06  Per Arne Vollan  <pvollan@apple.com>
    218
  • trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp

    r293266 r293893  
    109109{
    110110    ASSERT(!m_processLauncher);
     111    m_proccessStart = MonotonicTime::now();
    111112    ProcessLauncher::LaunchOptions launchOptions;
    112113    getLaunchOptions(launchOptions);
     
    258259    ASSERT(isMainRunLoop());
    259260
     261    auto launchTime = MonotonicTime::now() - m_proccessStart;
     262    if (launchTime > 1_s)
     263        RELEASE_LOG_FAULT(Process, "%s process (%p) took %f seconds to launch", processName().characters(), this, launchTime.value());
     264   
    260265    if (!IPC::Connection::identifierIsValid(connectionIdentifier))
    261266        return;
  • trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h

    r291946 r293893  
    188188    WebCore::ProcessIdentifier m_processIdentifier { WebCore::ProcessIdentifier::generate() };
    189189    std::optional<UseLazyStop> m_delayedResponsivenessCheck;
     190    MonotonicTime m_proccessStart;
    190191};
    191192
Note: See TracChangeset for help on using the changeset viewer.