MemoryInstrumentation is our primary method for WebCore internal classes. But due to historical reasons sizes for some objects were calculated manually. I think we could fix this.
Created attachment 168684 [details] Patch
Created attachment 168685 [details] Patch
Comment on attachment 168685 [details] Patch Attachment 168685 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/14300666
Comment on attachment 168685 [details] Patch Attachment 168685 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/14289634
Comment on attachment 168685 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168685&action=review > Source/WebCore/inspector/InspectorMemoryAgent.cpp:156 > +static String nodeName(Node* node) No need to make it static as it is already in anonymous namespace.
Comment on attachment 168685 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168685&action=review > Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js:-479 > - unusedSize -= child.children[j].size; Why do you need this *.Unused record? What's wrong with calculating it? What's if *.Unused is not present? It seems that unusedSize will be zero, e.g. for JSHeap.
Comment on attachment 168685 [details] Patch Attachment 168685 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14290676
Comment on attachment 168685 [details] Patch Attachment 168685 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/14288730
Comment on attachment 168685 [details] Patch Attachment 168685 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/14292740
Committed r131299: <http://trac.webkit.org/changeset/131299>
(In reply to comment #6) > (From update of attachment 168685 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=168685&action=review > > > Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js:-479 > > - unusedSize -= child.children[j].size; > > Why do you need this *.Unused record? What's wrong with calculating it? What's if *.Unused is not present? It seems that unusedSize will be zero, e.g. for JSHeap. This patch flips the code from manual block building to the automatic builder. The builder builds parent MemoryBlocks on the fly and calculates their sizes. As a result when I use automatic builder code for JSHeap I need to add two blocks, JSHeap.Used and JSHeap.Unused. The builder makes parent JSHeap block automatically and assigns the right size to it. Latter, on the front end size, we use JSHeap size as the allocated size and JSHeap.Unused as unused size for JSHeap.
Created attachment 168737 [details] [please ignore] Added FloatRect::extend() to simplify writing loops that accumulate the bounding box for a sequence of vertices. For example: FloatRect box(vertices[0], FloatSize(0,0)); for (unsigned i = 1; i < vertices.length; i++) box.extend(vertices[i]); ExclusionShape and ExclusionPolygon now use FloatRect::extend().
(In reply to comment #12) > Created an attachment (id=168737) [details] My apologies for accidentally attaching this patch/comment to the wrong bug.