Bug 205882 - Reformat WebProcessPool logging
Summary: Reformat WebProcessPool logging
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-07 12:50 PST by Keith Rollin
Modified: 2020-01-13 20:21 PST (History)
4 users (show)

See Also:


Attachments
Patch (15.93 KB, patch)
2020-01-07 12:59 PST, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2020-01-07 12:50:32 PST
Update the format used by WebProcessPool 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:

    Using prewarmed process 0

becomes:

    0x7f81e8804008 - WebProcessPool::processForRegistrableDomain: Using prewarmed process (process=0x1471c2a00, PID=64197)
Comment 1 Radar WebKit Bug Importer 2020-01-07 12:50:47 PST
<rdar://problem/58384349>
Comment 2 Keith Rollin 2020-01-07 12:59:57 PST
Created attachment 387021 [details]
Patch
Comment 3 Brent Fulgham 2020-01-07 16:26:04 PST
Comment on attachment 387021 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=387021&action=review

> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:110
> +#define WEBPROCESSPOOL_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, "%p - WebProcessPool::" fmt, this, ##__VA_ARGS__)

Should we #undef this at the end of the file?

> Source/WebKit/UIProcess/WebProcessPool.cpp:141
> +#define WEBPROCESSPOOL_RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), channel, "%p - WebProcessPool::" fmt, this, ##__VA_ARGS__)

Should you be #undef these at the end, in case these get concatenated into UnifiedBuild?
Comment 4 Keith Rollin 2020-01-07 16:34:47 PST
(In reply to Brent Fulgham from comment #3)
> Comment on attachment 387021 [details]
> Should you be #undef these at the end, in case these get concatenated into
> UnifiedBuild?

Good question. We #undef in the case where the macros we define are generic, such as RELEASE_LOG_IF_ALLOWED. However, I prefixed these with "WEBPROCESSPOOL_", creating a bit of a namespace that should prevent any collision with other unified files.

I'm thinking of going forward with this approach on future files I modify, and going back to other files I've recently modified and ensuring they also take the same approach.
Comment 5 Brent Fulgham 2020-01-13 14:13:56 PST
Comment on attachment 387021 [details]
Patch

r=me
Comment 6 WebKit Commit Bot 2020-01-13 20:21:38 PST
Comment on attachment 387021 [details]
Patch

Clearing flags on attachment: 387021

Committed r254487: <https://trac.webkit.org/changeset/254487>
Comment 7 WebKit Commit Bot 2020-01-13 20:21:40 PST
All reviewed patches have been landed.  Closing bug.