Title: [269993] trunk/Source/WebKit
- Revision
- 269993
- Author
- [email protected]
- Date
- 2020-11-18 15:01:01 -0800 (Wed, 18 Nov 2020)
Log Message
Drop redundant code that tries to bump the QoS of the WebContent main thread of UserInteractive when handling a sync IPC
https://bugs.webkit.org/show_bug.cgi?id=219110
Reviewed by Alex Christensen.
Drop redundant code that tries to bump the QoS of the WebContent main thread of UserInteractive when
handling a sync IPC. Nowadays, we always run the main thread of the WebContent at UserInteractive QoS
(see WTF::Thread::setCurrentThreadIsUserInteractive() call in WebProcess::initializeWebProcess()) so
there is no need to boost the QoS during a sync IPC.
* Platform/IPC/Connection.cpp:
(IPC::Connection::processIncomingMessage):
* Platform/IPC/Connection.h:
(IPC::Connection::setShouldBoostMainThreadOnSyncMessage): Deleted.
* Platform/IPC/Decoder.h:
(IPC::Decoder::setQOSClassOverride): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (269992 => 269993)
--- trunk/Source/WebKit/ChangeLog 2020-11-18 22:50:36 UTC (rev 269992)
+++ trunk/Source/WebKit/ChangeLog 2020-11-18 23:01:01 UTC (rev 269993)
@@ -1,3 +1,24 @@
+2020-11-18 Chris Dumez <[email protected]>
+
+ Drop redundant code that tries to bump the QoS of the WebContent main thread of UserInteractive when handling a sync IPC
+ https://bugs.webkit.org/show_bug.cgi?id=219110
+
+ Reviewed by Alex Christensen.
+
+ Drop redundant code that tries to bump the QoS of the WebContent main thread of UserInteractive when
+ handling a sync IPC. Nowadays, we always run the main thread of the WebContent at UserInteractive QoS
+ (see WTF::Thread::setCurrentThreadIsUserInteractive() call in WebProcess::initializeWebProcess()) so
+ there is no need to boost the QoS during a sync IPC.
+
+ * Platform/IPC/Connection.cpp:
+ (IPC::Connection::processIncomingMessage):
+ * Platform/IPC/Connection.h:
+ (IPC::Connection::setShouldBoostMainThreadOnSyncMessage): Deleted.
+ * Platform/IPC/Decoder.h:
+ (IPC::Decoder::setQOSClassOverride): Deleted.
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::initializeConnection):
+
2020-11-18 Darin Adler <[email protected]>
Remove advanced plug-in feature: small plug-in blocking
Modified: trunk/Source/WebKit/Platform/IPC/Connection.cpp (269992 => 269993)
--- trunk/Source/WebKit/Platform/IPC/Connection.cpp 2020-11-18 22:50:36 UTC (rev 269992)
+++ trunk/Source/WebKit/Platform/IPC/Connection.cpp 2020-11-18 23:01:01 UTC (rev 269993)
@@ -748,13 +748,6 @@
if (dispatchMessageToThreadReceiver(message))
return;
-#if HAVE(QOS_CLASSES)
- if (message->isSyncMessage() && m_shouldBoostMainThreadOnSyncMessage) {
- pthread_override_t override = pthread_override_qos_class_start_np(m_mainThread, Thread::adjustedQOSClass(QOS_CLASS_USER_INTERACTIVE), 0);
- message->setQOSClassOverride(override);
- }
-#endif
-
if (message->isSyncMessage()) {
auto locker = holdLock(m_incomingSyncMessageCallbackMutex);
Modified: trunk/Source/WebKit/Platform/IPC/Connection.h (269992 => 269993)
--- trunk/Source/WebKit/Platform/IPC/Connection.h 2020-11-18 22:50:36 UTC (rev 269992)
+++ trunk/Source/WebKit/Platform/IPC/Connection.h 2020-11-18 23:01:01 UTC (rev 269993)
@@ -282,10 +282,6 @@
bool isValid() const { return m_isValid; }
-#if HAVE(QOS_CLASSES)
- void setShouldBoostMainThreadOnSyncMessage(bool b) { m_shouldBoostMainThreadOnSyncMessage = b; }
-#endif
-
uint64_t installIncomingSyncMessageCallback(WTF::Function<void()>&&);
void uninstallIncomingSyncMessageCallback(uint64_t);
bool hasIncomingSyncMessage();
@@ -435,7 +431,6 @@
#if HAVE(QOS_CLASSES)
pthread_t m_mainThread { 0 };
- bool m_shouldBoostMainThreadOnSyncMessage { false };
#endif
#if USE(UNIX_DOMAIN_SOCKETS)
Modified: trunk/Source/WebKit/Platform/IPC/Decoder.cpp (269992 => 269993)
--- trunk/Source/WebKit/Platform/IPC/Decoder.cpp 2020-11-18 22:50:36 UTC (rev 269992)
+++ trunk/Source/WebKit/Platform/IPC/Decoder.cpp 2020-11-18 23:01:01 UTC (rev 269993)
@@ -94,11 +94,6 @@
fastFree(const_cast<uint8_t*>(m_buffer));
// FIXME: We need to dispose of the mach ports in cases of failure.
-
-#if HAVE(QOS_CLASSES)
- if (m_qosClassOverride)
- pthread_override_qos_class_end_np(m_qosClassOverride);
-#endif
}
bool Decoder::isSyncMessage() const
Modified: trunk/Source/WebKit/Platform/IPC/Decoder.h (269992 => 269993)
--- trunk/Source/WebKit/Platform/IPC/Decoder.h 2020-11-18 22:50:36 UTC (rev 269992)
+++ trunk/Source/WebKit/Platform/IPC/Decoder.h 2020-11-18 23:01:01 UTC (rev 269993)
@@ -67,10 +67,6 @@
void setImportanceAssertion(std::unique_ptr<ImportanceAssertion>);
#endif
-#if HAVE(QOS_CLASSES)
- void setQOSClassOverride(pthread_override_t override) { m_qosClassOverride = override; }
-#endif
-
static std::unique_ptr<Decoder> unwrapForTesting(Decoder&);
const uint8_t* buffer() const { return m_buffer; }
@@ -208,10 +204,6 @@
#if PLATFORM(MAC)
std::unique_ptr<ImportanceAssertion> m_importanceAssertion;
#endif
-
-#if HAVE(QOS_CLASSES)
- pthread_override_t m_qosClassOverride { nullptr };
-#endif
};
} // namespace IPC
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (269992 => 269993)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2020-11-18 22:50:36 UTC (rev 269992)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2020-11-18 23:01:01 UTC (rev 269993)
@@ -312,10 +312,6 @@
connection->setShouldExitOnSyncMessageSendFailure(true);
#endif
-#if HAVE(QOS_CLASSES)
- connection->setShouldBoostMainThreadOnSyncMessage(true);
-#endif
-
m_eventDispatcher->initializeConnection(connection);
#if PLATFORM(IOS_FAMILY)
m_viewUpdateDispatcher->initializeConnection(connection);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes