The format of Native heap snapshot is slightly different so it should provide its own meta information.
Created attachment 188852 [details] Patch
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 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 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.
Committed r143218: <http://trac.webkit.org/changeset/143218>
(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?
(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.
(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.