Bug 146873 - [WK2] Diagnostic logging messages are causing too much IPC
Summary: [WK2] Diagnostic logging messages are causing too much IPC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-07-10 22:37 PDT by Chris Dumez
Modified: 2015-07-10 23:56 PDT (History)
4 users (show)

See Also:


Attachments
Patch (20.67 KB, patch)
2015-07-10 22:48 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (20.52 KB, patch)
2015-07-10 23:54 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-07-10 22:37:16 PDT
Diagnostic logging messages are causing too much IPC.
Comment 1 Chris Dumez 2015-07-10 22:37:44 PDT
rdar://problem/21779205
Comment 2 Chris Dumez 2015-07-10 22:48:41 PDT
Created attachment 256644 [details]
Patch
Comment 3 Ryosuke Niwa 2015-07-10 23:46:02 PDT
Comment on attachment 256644 [details]
Patch

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

> Source/WebCore/page/DiagnosticLoggingClient.h:45
> +    static bool shouldLogGivenSampling(ShouldSample);

I'm not certain if this is the most descriptive name.  How about isLogSelectedInSample or shouldLogAfterSampling?

> Source/WebCore/page/DiagnosticLoggingClient.h:56
> +    // Log 5% of messages when sampling.

I don't think we need this comment.  The code speaks for itself.

> Source/WebKit2/NetworkProcess/NetworkProcess.cpp:485
> +    parentProcessConnection()->send(Messages::NetworkProcessProxy::LogPreSampledDiagnosticMessage(webPageID, message, description), 0);

I don't think it makes sense to call these PreSampled.  If anything, these are post sampling.
Why don't we simply call it LogSampledDiagnosticMessage?
Comment 4 Chris Dumez 2015-07-10 23:54:23 PDT
Created attachment 256649 [details]
Patch
Comment 5 Chris Dumez 2015-07-10 23:56:54 PDT
Comment on attachment 256649 [details]
Patch

Clearing flags on attachment: 256649

Committed r186707: <http://trac.webkit.org/changeset/186707>
Comment 6 Chris Dumez 2015-07-10 23:56:58 PDT
All reviewed patches have been landed.  Closing bug.