Update the format used by WebProcess in its RELEASE_LOG logging. Use the format used by WebPageProxy and NetworkResourceLoader, which is generally of the form: <object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values> So, for example: 0x6f1df7000 - WebProcess::destroyRenderingResources() took 0.02ms becomes: 0x6f1df7000 - WebProcess::destroyRenderingResources: took 0.02ms So there's not actually much difference in that example line. That's because the only "values that help thread together operations" is the WebProcess PID, which is automatically logged by the os_log system. But other logging lines show more significant changes. For example, there are some logging lines that didn't used to log the method name.
<rdar://problem/58283294>
Created attachment 386627 [details] Patch
Based on comments from Chris, I'm incorporating the following changes: * Rather than having a separate macro for each channel to which we're logging, have a single macro that takes a channel as a parameter. * Log the sessionID as part of the "values that help thread together operations". * Hide the logging in private sessions.
Created attachment 386637 [details] Patch
Comment on attachment 386637 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=386637&action=review > Source/WebKit/WebProcess/WebProcess.cpp:171 > +#define RELEASE_LOG_SESSION_ID (m_sessionID.hasValue() ? m_sessionID->toUInt64() : 0) m_sessionID.valueOr(0) > Source/WebKit/WebProcess/WebProcess.h:489 > + bool isAlwaysOnLoggingAllowed() { return m_sessionID.hasValue() ? m_sessionID->isAlwaysOnLoggingAllowed() : true; } m_sessionID ? m_sessionID->isAlwaysOnLoggingAllowed() : true; > Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:129 > +#define RELEASE_LOG_SESSION_ID (m_sessionID.hasValue() ? m_sessionID->toUInt64() : 0) valueOr()
I chatted with Chris, and we realized that the ValueOr approach wouldn't work (since we need to also call toUInt64(), and we can't apply that to "0"). So we'll change those lines, but only to remove ".hasValue()".
Created attachment 386638 [details] Patch
Looks like I need to rebase.
Created attachment 386648 [details] Patch
Comment on attachment 386648 [details] Patch Clearing flags on attachment: 386648 Committed r253990: <https://trac.webkit.org/changeset/253990>
All reviewed patches have been landed. Closing bug.