Bug 110104 - Web Inspector: Native Memory Instrumentation: Generate meta information for HeapSnapshot parser
Summary: Web Inspector: Native Memory Instrumentation: Generate meta information for H...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ilya Tikhonovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-18 04:41 PST by Ilya Tikhonovsky
Modified: 2013-02-18 23:23 PST (History)
16 users (show)

See Also:


Attachments
Patch (16.29 KB, patch)
2013-02-18 04:47 PST, Ilya Tikhonovsky
yurys: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Tikhonovsky 2013-02-18 04:41:34 PST
The format of Native heap snapshot is slightly different so it should provide its own meta information.
Comment 1 Ilya Tikhonovsky 2013-02-18 04:47:12 PST
Created attachment 188852 [details]
Patch
Comment 2 Build Bot 2013-02-18 05:27:30 PST
Comment on attachment 188852 [details]
Patch

Attachment 188852 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://queues.webkit.org/results/16608326

New failing tests:
inspector/profiler/memory-instrumentation-cached-images.html
Comment 3 WebKit Review Bot 2013-02-18 05:33:09 PST
Comment on attachment 188852 [details]
Patch

Attachment 188852 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/16612190

New failing tests:
inspector/profiler/memory-instrumentation-cached-images.html
inspector/profiler/memory-instrumentation-canvas.html
inspector-protocol/nmi-webaudio-leak-test.html
inspector-protocol/nmi-webaudio.html
Comment 4 Yury Semikhatsky 2013-02-18 06:50:02 PST
Comment on attachment 188852 [details]
Patch

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

> Source/WebCore/inspector/HeapGraphSerializer.cpp:64
> +    // FIXME: It is using as a magic constant for 'object' node type.

It is using -> It is used

> Source/WebCore/inspector/HeapGraphSerializer.cpp:175
> +                "[],"

Please add a comment here that we are trying to use the same array of strings as for other values instead of providing a predefined enum of types.

> Source/WebCore/inspector/HeapGraphSerializer.cpp:225
> +    m_typeStrings->setNumber(string, stringId);

This map is redundant we could store something like array of type ids instead.

> Source/WebCore/inspector/Inspector.json:81
> +                    { "name": "graphMetaInformation", "type": "object", "description": "An object describing a meta information about the heap graph."}

"An object describing structures of nodes and edges in the graph."

> Source/WebCore/inspector/front-end/HeapSnapshot.js:1034
> +                    console.log(JSON.stringify(dumpNode.serialize()));

Please add some indentation for the formatted JSON string.
Comment 5 Ilya Tikhonovsky 2013-02-18 07:47:57 PST
Committed r143218: <http://trac.webkit.org/changeset/143218>
Comment 6 Alan Cutter 2013-02-18 19:14:47 PST
(In reply to comment #5)
> Committed r143218: <http://trac.webkit.org/changeset/143218>

It seems this patch may have caused HeapGraphSerializerTest in run-api-tests to start failing: http://build.webkit.org/builders/Chromium%20Linux%20Release%20%28Tests%29/builds/44930/steps/run-api-tests/logs/stdio

Do you think these tests need rebaselining or are these results unexpected?
Comment 7 Ilya Tikhonovsky 2013-02-18 23:20:52 PST
(In reply to comment #6)
> (In reply to comment #5)
> > Committed r143218: <http://trac.webkit.org/changeset/143218>
> 
> It seems this patch may have caused HeapGraphSerializerTest in run-api-tests to start failing: http://build.webkit.org/builders/Chromium%20Linux%20Release%20%28Tests%29/builds/44930/steps/run-api-tests/logs/stdio
> 
> Do you think these tests need rebaselining or are these results unexpected?

Rebaselined. Thanks.
Comment 8 Ilya Tikhonovsky 2013-02-18 23:23:19 PST
(In reply to comment #4)
> (From update of attachment 188852 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=188852&action=review
> 
> > Source/WebCore/inspector/HeapGraphSerializer.cpp:64
> > +    // FIXME: It is using as a magic constant for 'object' node type.
> 
> It is using -> It is used

done

> 
> > Source/WebCore/inspector/HeapGraphSerializer.cpp:175
> > +                "[],"
> 
> Please add a comment here that we are trying to use the same array of strings as for other values instead of providing a predefined enum of types.
> 

done


> > Source/WebCore/inspector/HeapGraphSerializer.cpp:225
> > +    m_typeStrings->setNumber(string, stringId);
> 
> This map is redundant we could store something like array of type ids instead.
> 

I'll do that in another patch.


> > Source/WebCore/inspector/Inspector.json:81
> > +                    { "name": "graphMetaInformation", "type": "object", "description": "An object describing a meta information about the heap graph."}
> 
> "An object describing structures of nodes and edges in the graph."
> 

done


> > Source/WebCore/inspector/front-end/HeapSnapshot.js:1034
> > +                    console.log(JSON.stringify(dumpNode.serialize()));
> 
> Please add some indentation for the formatted JSON string.

I'll do that in another patch.