Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: e69d18ce55643f7f61f977da9bf08c194c2863c2 https://github.com/WebKit/WebKit/commit/e69d18ce55643f7f61f977da9bf08c194c2863c2 Author: Ben Nham <n...@apple.com> Date: 2024-03-28 (Thu, 28 Mar 2024)
Changed paths: M Source/WebKit/Scripts/webkit/messages.py M Source/WebKit/Scripts/webkit/tests/MessageNames.h M Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp M Source/WebKit/UIProcess/ProcessThrottler.cpp M Source/WebKit/UIProcess/ProcessThrottler.h Log Message: ----------- Log quiet activities when throttler is forced to invalidate all activities https://bugs.webkit.org/show_bug.cgi?id=271799 rdar://125510942 Reviewed by Chris Dumez. We have had various bugs where an async IPC starts but never finishes, causing the process to stay alive for up to 30 seconds after it is supposed to actually suspend (e.g. 274157@main). Up to now, those async IPCs start quiet background activities, which log nothing when we are forced to invalidate all activities. Make these types of bugs easier to debug in the future by logging quiet activities in ProcessThrottler::invalidateAllActivities. To do this, I added a new descriptionLiteral function in the IPC namespace, which works since all message name descriptions are already string literals. I considered a larger patch that changes all of the message name descriptions from `const char*` to `ASCIILiteral`, but that didn't seem worth changing since it turns out that almost all uses of the current description function expect the return type to be `const char*` anyway (e.g. they pass it into a printf-type logging function). * Source/WebKit/Scripts/webkit/messages.py: (generate_message_names_header): * Source/WebKit/Scripts/webkit/tests/MessageNames.h: (IPC::descriptionLiteral): * Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::sendMessage): * Source/WebKit/UIProcess/ProcessThrottler.cpp: (WebKit::ProcessThrottler::invalidateAllActivities): (WebKit::ProcessThrottlerActivity::ProcessThrottlerActivity): (WebKit::ProcessThrottlerActivity::invalidate): * Source/WebKit/UIProcess/ProcessThrottler.h: (WebKit::ProcessThrottlerActivity::~ProcessThrottlerActivity): (WebKit::ProcessThrottlerActivity::isQuietActivity const): (WebKit::ProcessThrottler::foregroundActivity): (WebKit::ProcessThrottler::backgroundActivity): (WebKit::ProcessThrottler::quietBackgroundActivity): Canonical link: https://commits.webkit.org/276783@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes