Bug 77726

Summary: Web Inspector: Retained size for classes is too conservative in heap profiler
Product: WebKit Reporter: Alexei Filippov <alph>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 78411    
Attachments:
Description Flags
Patch
none
Patch none

Description Alexei Filippov 2012-02-03 02:11:59 PST
Retained size for all objects of particular class currently just shows size of the largest object of this class.
This estimate is too conservative and thus makes sorting by retained sizes (which is the default) useless.
Make it more precise.
Comment 1 Alexei Filippov 2012-02-03 02:24:56 PST
Created attachment 125296 [details]
Patch
Comment 2 Yury Semikhatsky 2012-02-03 05:55:25 PST
Comment on attachment 125296 [details]
Patch

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

> Source/WebCore/inspector/front-end/HeapSnapshot.js:918
> +        function skip(node)

skip -> shouldSkip?

> Source/WebCore/inspector/front-end/HeapSnapshot.js:951
> +        var snapshot = this;

Just pass it as a parameter to forDominatedNodes.

> Source/WebCore/inspector/front-end/HeapSnapshot.js:961
> +            var doms = snapshot._dominatedNodesOfNode(node);

doms -> dominatedNodeIndexes, we usually avoid abbreviations in the front-end code
Comment 3 Alexei Filippov 2012-02-03 07:17:52 PST
Created attachment 125320 [details]
Patch
Comment 4 WebKit Review Bot 2012-02-03 08:50:30 PST
Comment on attachment 125320 [details]
Patch

Clearing flags on attachment: 125320

Committed r106665: <http://trac.webkit.org/changeset/106665>
Comment 5 WebKit Review Bot 2012-02-03 08:50:35 PST
All reviewed patches have been landed.  Closing bug.