Changeset 269993 in webkit
- Timestamp:
- Nov 18, 2020, 3:01:01 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r269985 r269993 1 2020-11-18 Chris Dumez <cdumez@apple.com> 2 3 Drop redundant code that tries to bump the QoS of the WebContent main thread of UserInteractive when handling a sync IPC 4 https://bugs.webkit.org/show_bug.cgi?id=219110 5 6 Reviewed by Alex Christensen. 7 8 Drop redundant code that tries to bump the QoS of the WebContent main thread of UserInteractive when 9 handling a sync IPC. Nowadays, we always run the main thread of the WebContent at UserInteractive QoS 10 (see WTF::Thread::setCurrentThreadIsUserInteractive() call in WebProcess::initializeWebProcess()) so 11 there is no need to boost the QoS during a sync IPC. 12 13 * Platform/IPC/Connection.cpp: 14 (IPC::Connection::processIncomingMessage): 15 * Platform/IPC/Connection.h: 16 (IPC::Connection::setShouldBoostMainThreadOnSyncMessage): Deleted. 17 * Platform/IPC/Decoder.h: 18 (IPC::Decoder::setQOSClassOverride): Deleted. 19 * WebProcess/WebProcess.cpp: 20 (WebKit::WebProcess::initializeConnection): 21 1 22 2020-11-18 Darin Adler <darin@apple.com> 2 23 -
trunk/Source/WebKit/Platform/IPC/Connection.cpp
r268848 r269993 749 749 return; 750 750 751 #if HAVE(QOS_CLASSES)752 if (message->isSyncMessage() && m_shouldBoostMainThreadOnSyncMessage) {753 pthread_override_t override = pthread_override_qos_class_start_np(m_mainThread, Thread::adjustedQOSClass(QOS_CLASS_USER_INTERACTIVE), 0);754 message->setQOSClassOverride(override);755 }756 #endif757 758 751 if (message->isSyncMessage()) { 759 752 auto locker = holdLock(m_incomingSyncMessageCallbackMutex); -
trunk/Source/WebKit/Platform/IPC/Connection.h
r268848 r269993 283 283 bool isValid() const { return m_isValid; } 284 284 285 #if HAVE(QOS_CLASSES)286 void setShouldBoostMainThreadOnSyncMessage(bool b) { m_shouldBoostMainThreadOnSyncMessage = b; }287 #endif288 289 285 uint64_t installIncomingSyncMessageCallback(WTF::Function<void()>&&); 290 286 void uninstallIncomingSyncMessageCallback(uint64_t); … … 436 432 #if HAVE(QOS_CLASSES) 437 433 pthread_t m_mainThread { 0 }; 438 bool m_shouldBoostMainThreadOnSyncMessage { false };439 434 #endif 440 435 -
trunk/Source/WebKit/Platform/IPC/Decoder.cpp
r269327 r269993 95 95 96 96 // FIXME: We need to dispose of the mach ports in cases of failure. 97 98 #if HAVE(QOS_CLASSES)99 if (m_qosClassOverride)100 pthread_override_qos_class_end_np(m_qosClassOverride);101 #endif102 97 } 103 98 -
trunk/Source/WebKit/Platform/IPC/Decoder.h
r269327 r269993 68 68 #endif 69 69 70 #if HAVE(QOS_CLASSES)71 void setQOSClassOverride(pthread_override_t override) { m_qosClassOverride = override; }72 #endif73 74 70 static std::unique_ptr<Decoder> unwrapForTesting(Decoder&); 75 71 … … 209 205 std::unique_ptr<ImportanceAssertion> m_importanceAssertion; 210 206 #endif 211 212 #if HAVE(QOS_CLASSES)213 pthread_override_t m_qosClassOverride { nullptr };214 #endif215 207 }; 216 208 -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r269807 r269993 313 313 #endif 314 314 315 #if HAVE(QOS_CLASSES)316 connection->setShouldBoostMainThreadOnSyncMessage(true);317 #endif318 319 315 m_eventDispatcher->initializeConnection(connection); 320 316 #if PLATFORM(IOS_FAMILY)
Note:
See TracChangeset
for help on using the changeset viewer.