WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 205691
Reformat WebProcess logging
https://bugs.webkit.org/show_bug.cgi?id=205691
Summary
Reformat WebProcess logging
Keith Rollin
Reported
2020-01-02 13:54:14 PST
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.
Attachments
Patch
(18.53 KB, patch)
2020-01-02 13:57 PST
,
Keith Rollin
no flags
Details
Formatted Diff
Diff
Patch
(19.57 KB, patch)
2020-01-02 15:22 PST
,
Keith Rollin
no flags
Details
Formatted Diff
Diff
Patch
(19.62 KB, patch)
2020-01-02 15:43 PST
,
Keith Rollin
no flags
Details
Formatted Diff
Diff
Patch
(14.73 KB, patch)
2020-01-02 16:52 PST
,
Keith Rollin
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-01-02 13:54:27 PST
<
rdar://problem/58283294
>
Keith Rollin
Comment 2
2020-01-02 13:57:35 PST
Created
attachment 386627
[details]
Patch
Keith Rollin
Comment 3
2020-01-02 15:10:57 PST
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.
Keith Rollin
Comment 4
2020-01-02 15:22:44 PST
Created
attachment 386637
[details]
Patch
Chris Dumez
Comment 5
2020-01-02 15:28:27 PST
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()
Keith Rollin
Comment 6
2020-01-02 15:41:55 PST
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()".
Keith Rollin
Comment 7
2020-01-02 15:43:11 PST
Created
attachment 386638
[details]
Patch
Keith Rollin
Comment 8
2020-01-02 15:44:31 PST
Looks like I need to rebase.
Keith Rollin
Comment 9
2020-01-02 16:52:13 PST
Created
attachment 386648
[details]
Patch
WebKit Commit Bot
Comment 10
2020-01-02 19:52:21 PST
Comment on
attachment 386648
[details]
Patch Clearing flags on attachment: 386648 Committed
r253990
: <
https://trac.webkit.org/changeset/253990
>
WebKit Commit Bot
Comment 11
2020-01-02 19:52:23 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug