Bug 153509 - Generalize ResourceUsageData gathering to be used outside of ResourceUsageOverlay
Summary: Generalize ResourceUsageData gathering to be used outside of ResourceUsageOve...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks: 153516
  Show dependency treegraph
 
Reported: 2016-01-26 13:56 PST by Joseph Pecoraro
Modified: 2016-01-26 17:32 PST (History)
11 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (59.43 KB, patch)
2016-01-26 14:06 PST, Joseph Pecoraro
kling: review+
kling: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2016-01-26 13:56:34 PST
* SUMMARY
Generalize ResourceUsageData gathering to be used outside of ResourceUsageOverlay.

Inspector wants to show some high level memory information. It could reuse the data, and data gathering, that ResourceUsageOverlay currently does. Rework this so that the ResourceUsageData to be used by inspector can be gathered in a platform independent way. Rename the enable flag now that this will not be specific to an Overlay.
Comment 1 Radar WebKit Bug Importer 2016-01-26 13:57:01 PST
<rdar://problem/24354291>
Comment 2 Joseph Pecoraro 2016-01-26 14:06:03 PST
Created attachment 269916 [details]
[PATCH] Proposed Fix
Comment 3 WebKit Commit Bot 2016-01-26 14:07:45 PST
Attachment 269916 [details] did not pass style-queue:


ERROR: Source/WebCore/page/ResourceUsageThread.h:49:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/ResourceUsageThread.h:68:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/ResourceUsageData.h:63:  The parameter name "data" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/page/ResourceUsageThread.cpp:48:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/ResourceUsageThread.cpp:83:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 5 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Andreas Kling 2016-01-26 15:35:58 PST
Comment on attachment 269916 [details]
[PATCH] Proposed Fix

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

r=me

> Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm:173
> +    ASSERT(categories.size = d.categories.size);
> +    for (size_t i = 0; i < categories.size; ++i)

size() vs size
= vs ==
Comment 5 Andreas Kling 2016-01-26 15:36:24 PST
Comment on attachment 269916 [details]
[PATCH] Proposed Fix

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

> Source/WebCore/page/scrolling/ScrollingThread.cpp:54
> -        std::lock_guard<Lock> lock(singleton().m_functionsMutex);
> +        std::lock_guard<Lock> lock(scrollingThread.m_functionsMutex);

joe pls
Comment 6 Joseph Pecoraro 2016-01-26 17:32:20 PST
<http://trac.webkit.org/changeset/195644>