WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
104888
Web Inspector: collect native heap graph and report it to the front-end
https://bugs.webkit.org/show_bug.cgi?id=104888
Summary
Web Inspector: collect native heap graph and report it to the front-end
Yury Semikhatsky
Reported
2012-12-13 00:47:00 PST
Now that memory instrumentation has API for reporting heap nodes and edges we can serialize the graph and send it to the front-end.
Attachments
Patch
(30.19 KB, patch)
2012-12-13 01:09 PST
,
Yury Semikhatsky
no flags
Details
Formatted Diff
Diff
Patch
(30.84 KB, patch)
2012-12-13 03:19 PST
,
Yury Semikhatsky
pfeldman
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yury Semikhatsky
Comment 1
2012-12-13 01:09:56 PST
Created
attachment 179225
[details]
Patch
Ilya Tikhonovsky
Comment 2
2012-12-13 01:33:19 PST
Comment on
attachment 179225
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=179225&action=review
> Source/WebCore/inspector/HeapGraphSerializer.cpp:81 > +HeapGraphSerializer::HeapGraphSerializer()
HeapGraphSerializer -> HeapGraph
> Source/WebCore/inspector/HeapGraphSerializer.h:77 > + typedef HashMap<String, int> StringMap; > + StringMap m_stringToIndex; > + Vector<String> m_strings; > + int m_lastReportedEdgeIndex; > + > + typedef HashMap<const void*, int> ObjectToNodeIndex; > + ObjectToNodeIndex m_objectToNodeIndex; > + > + typedef HashMap<const void*, const void*> BaseToRealAddress; > + BaseToRealAddress m_baseToRealAddress; > + > + Vector<HeapGraphNode> m_nodes; > + Vector<HeapGraphEdge> m_edges;
please implement reportMemoryUsage method.
Yury Semikhatsky
Comment 3
2012-12-13 03:19:38 PST
Created
attachment 179243
[details]
Patch
Yury Semikhatsky
Comment 4
2012-12-13 03:22:24 PST
(In reply to
comment #2
)
> (From update of
attachment 179225
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=179225&action=review
> > > Source/WebCore/inspector/HeapGraphSerializer.cpp:81 > > +HeapGraphSerializer::HeapGraphSerializer() > > HeapGraphSerializer -> HeapGraph >
I disagree, HeapGraphSerializer better reflects intent of the class which receives signals from the memory instrumentation and serializes them into a heap graph representation, it doesn't allow you to change the graph or read it.
> > Source/WebCore/inspector/HeapGraphSerializer.h:77 > > + typedef HashMap<String, int> StringMap; > > + StringMap m_stringToIndex; > > + Vector<String> m_strings; > > + int m_lastReportedEdgeIndex; > > + > > + typedef HashMap<const void*, int> ObjectToNodeIndex; > > + ObjectToNodeIndex m_objectToNodeIndex; > > + > > + typedef HashMap<const void*, const void*> BaseToRealAddress; > > + BaseToRealAddress m_baseToRealAddress; > > + > > + Vector<HeapGraphNode> m_nodes; > > + Vector<HeapGraphEdge> m_edges; > > please implement reportMemoryUsage method.
Done.
Ilya Tikhonovsky
Comment 5
2012-12-13 04:21:35 PST
Comment on
attachment 179225
[details]
Patch lgtm
Yury Semikhatsky
Comment 6
2012-12-14 00:45:30 PST
Committed
r137728
: <
http://trac.webkit.org/changeset/137728
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug