- a/Source/WebKit2/ChangeLog +14 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2017-06-12  Chris Dumez  <cdumez@apple.com>
2
3
        Include PID in some UIProcess-side release logging that relates to a particular WebProcess
4
        https://bugs.webkit.org/show_bug.cgi?id=173299
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * UIProcess/BackgroundProcessResponsivenessTimer.cpp:
9
        (WebKit::BackgroundProcessResponsivenessTimer::setResponsive):
10
        * UIProcess/WebProcessProxy.cpp:
11
        (WebKit::WebProcessProxy::didExceedActiveMemoryLimit):
12
        (WebKit::WebProcessProxy::didExceedInactiveMemoryLimit):
13
        (WebKit::WebProcessProxy::didExceedCPULimit):
14
1
2017-06-12  Simon Fraser  <simon.fraser@apple.com>
15
2017-06-12  Simon Fraser  <simon.fraser@apple.com>
2
16
3
        [iOS WK2] Peeking on an image could result in a preview at the wrong size
17
        [iOS WK2] Peeking on an image could result in a preview at the wrong size
- a/Source/WebKit2/UIProcess/BackgroundProcessResponsivenessTimer.cpp -2 / +2 lines
Lines 121-130 void BackgroundProcessResponsivenessTimer::setResponsive(bool isResponsive) a/Source/WebKit2/UIProcess/BackgroundProcessResponsivenessTimer.cpp_sec1
121
    client().didChangeIsResponsive();
121
    client().didChangeIsResponsive();
122
122
123
    if (m_isResponsive) {
123
    if (m_isResponsive) {
124
        RELEASE_LOG_ERROR(PerformanceLogging, "Notifying the client that a background WebProcess has become responsive again");
124
        RELEASE_LOG_ERROR(PerformanceLogging, "Notifying the client that a background WebProcess (pid: %d) has become responsive again", m_webProcessProxy.processIdentifier());
125
        client().didBecomeResponsive();
125
        client().didBecomeResponsive();
126
    } else {
126
    } else {
127
        RELEASE_LOG_ERROR(PerformanceLogging, "Notifying the client that a background WebProcess has become unresponsive");
127
        RELEASE_LOG_ERROR(PerformanceLogging, "Notifying the client that a background WebProcess (pid: %d) has become unresponsive", m_webProcessProxy.processIdentifier());
128
        client().didBecomeUnresponsive();
128
        client().didBecomeUnresponsive();
129
    }
129
    }
130
}
130
}
- a/Source/WebKit2/UIProcess/WebProcessProxy.cpp -5 / +5 lines
Lines 1214-1227 void WebProcessProxy::didExceedInactiveMemoryLimitWhileActive() a/Source/WebKit2/UIProcess/WebProcessProxy.cpp_sec1
1214
1214
1215
void WebProcessProxy::didExceedActiveMemoryLimit()
1215
void WebProcessProxy::didExceedActiveMemoryLimit()
1216
{
1216
{
1217
    RELEASE_LOG_ERROR(PerformanceLogging, "%p - WebProcessProxy::didExceedActiveMemoryLimit() Terminating WebProcess that has exceeded the active memory limit", this);
1217
    RELEASE_LOG_ERROR(PerformanceLogging, "%p - WebProcessProxy::didExceedActiveMemoryLimit() Terminating WebProcess with pid %d that has exceeded the active memory limit", this, processIdentifier());
1218
    logDiagnosticMessageForResourceLimitTermination(DiagnosticLoggingKeys::exceededActiveMemoryLimitKey());
1218
    logDiagnosticMessageForResourceLimitTermination(DiagnosticLoggingKeys::exceededActiveMemoryLimitKey());
1219
    requestTermination(ProcessTerminationReason::ExceededMemoryLimit);
1219
    requestTermination(ProcessTerminationReason::ExceededMemoryLimit);
1220
}
1220
}
1221
1221
1222
void WebProcessProxy::didExceedInactiveMemoryLimit()
1222
void WebProcessProxy::didExceedInactiveMemoryLimit()
1223
{
1223
{
1224
    RELEASE_LOG_ERROR(PerformanceLogging, "%p - WebProcessProxy::didExceedInactiveMemoryLimit() Terminating WebProcess that has exceeded the inactive memory limit", this);
1224
    RELEASE_LOG_ERROR(PerformanceLogging, "%p - WebProcessProxy::didExceedInactiveMemoryLimit() Terminating WebProcess with pid %d that has exceeded the inactive memory limit", this, processIdentifier());
1225
    logDiagnosticMessageForResourceLimitTermination(DiagnosticLoggingKeys::exceededInactiveMemoryLimitKey());
1225
    logDiagnosticMessageForResourceLimitTermination(DiagnosticLoggingKeys::exceededInactiveMemoryLimitKey());
1226
    requestTermination(ProcessTerminationReason::ExceededMemoryLimit);
1226
    requestTermination(ProcessTerminationReason::ExceededMemoryLimit);
1227
}
1227
}
Lines 1230-1241 void WebProcessProxy::didExceedCPULimit() a/Source/WebKit2/UIProcess/WebProcessProxy.cpp_sec2
1230
{
1230
{
1231
    for (auto& page : pages()) {
1231
    for (auto& page : pages()) {
1232
        if (page->isPlayingAudio()) {
1232
        if (page->isPlayingAudio()) {
1233
            RELEASE_LOG(PerformanceLogging, "%p - WebProcessProxy::didExceedCPULimit() WebProcess has exceeded the background CPU limit but we are not terminating it because there is audio playing", this);
1233
            RELEASE_LOG(PerformanceLogging, "%p - WebProcessProxy::didExceedCPULimit() WebProcess with pid %d has exceeded the background CPU limit but we are not terminating it because there is audio playing", this, processIdentifier());
1234
            return;
1234
            return;
1235
        }
1235
        }
1236
1236
1237
        if (page->hasActiveAudioStream() || page->hasActiveVideoStream()) {
1237
        if (page->hasActiveAudioStream() || page->hasActiveVideoStream()) {
1238
            RELEASE_LOG(PerformanceLogging, "%p - WebProcessProxy::didExceedCPULimit() WebProcess has exceeded the background CPU limit but we are not terminating it because it is capturing audio / video", this);
1238
            RELEASE_LOG(PerformanceLogging, "%p - WebProcessProxy::didExceedCPULimit() WebProcess with pid %d has exceeded the background CPU limit but we are not terminating it because it is capturing audio / video", this, processIdentifier());
1239
            return;
1239
            return;
1240
        }
1240
        }
1241
    }
1241
    }
Lines 1252-1258 void WebProcessProxy::didExceedCPULimit() a/Source/WebKit2/UIProcess/WebProcessProxy.cpp_sec3
1252
    if (hasVisiblePage)
1252
    if (hasVisiblePage)
1253
        return;
1253
        return;
1254
1254
1255
    RELEASE_LOG_ERROR(PerformanceLogging, "%p - WebProcessProxy::didExceedCPULimit() Terminating background WebProcess that has exceeded the background CPU limit", this);
1255
    RELEASE_LOG_ERROR(PerformanceLogging, "%p - WebProcessProxy::didExceedCPULimit() Terminating background WebProcess with pid %d that has exceeded the background CPU limit", this, processIdentifier());
1256
    logDiagnosticMessageForResourceLimitTermination(DiagnosticLoggingKeys::exceededBackgroundCPULimitKey());
1256
    logDiagnosticMessageForResourceLimitTermination(DiagnosticLoggingKeys::exceededBackgroundCPULimitKey());
1257
    requestTermination(ProcessTerminationReason::ExceededCPULimit);
1257
    requestTermination(ProcessTerminationReason::ExceededCPULimit);
1258
}
1258
}

Return to Bug 173299