RESOLVED FIXED 105725
Web Inspector: Native Memory Instrumentation: propagate ownership type to the serialized heap graph
https://bugs.webkit.org/show_bug.cgi?id=105725
Summary Web Inspector: Native Memory Instrumentation: propagate ownership type to the...
Ilya Tikhonovsky
Reported 2012-12-24 09:29:44 PST
We are collecting information about edges but do not report the edge type. But we could calculate edge types almost automatically. Actually WebCore uses three edge types. ByPointer usually means a weak reference. ByOwnPtr means a single strong reference. ByRefPtr means one or more strong references. In some cases a pointer to an object could be a strong reference. I hope it is relatively rare case in WebCore. If it is possible I'll replace such pointer with OwnPtr. If it is not possible, I'll introduce addStrongPointerMember method.
Attachments
Patch (22.94 KB, patch)
2012-12-24 09:39 PST, Ilya Tikhonovsky
no flags
Patch (25.09 KB, patch)
2012-12-24 22:00 PST, Ilya Tikhonovsky
yurys: review+
Ilya Tikhonovsky
Comment 1 2012-12-24 09:39:37 PST
Build Bot
Comment 2 2012-12-24 10:15:31 PST
Yury Semikhatsky
Comment 3 2012-12-24 20:59:11 PST
Comment on attachment 180675 [details] Patch You'll also need to update export symbols I think. View in context: https://bugs.webkit.org/attachment.cgi?id=180675&action=review > Source/WTF/wtf/MemoryInstrumentation.h:49 > + ByPointer, Let's rename MemoryOwningType to HeapGraphEdgeType and the values to PointerEdge, ReferenceEdge, OwnPtrEdge etc.(I'd prefer simply RefPtr, Pointer etc. but those would conflict with the classes). > Source/WebCore/inspector/HeapGraphSerializer.cpp:68 > + : m_refType(0) I'd leave it as m_type. > Source/WebCore/inspector/HeapGraphSerializer.cpp:89 > + memset(m_refTypes, 0, sizeof(m_refTypes)); m_refTypes -> m_edgeTypes.
Ilya Tikhonovsky
Comment 4 2012-12-24 22:00:17 PST
Ilya Tikhonovsky
Comment 5 2012-12-24 22:20:09 PST
(In reply to comment #3) > (From update of attachment 180675 [details]) > You'll also need to update export symbols I think. > > View in context: https://bugs.webkit.org/attachment.cgi?id=180675&action=review > > > Source/WTF/wtf/MemoryInstrumentation.h:49 > > + ByPointer, > > Let's rename MemoryOwningType to HeapGraphEdgeType and the values to PointerEdge, ReferenceEdge, OwnPtrEdge etc.(I'd prefer simply RefPtr, Pointer etc. but those would conflict with the classes). MemoryOwningType -> MemberType ByPointer -> PointerMember, ByReference -> ReferenceMember, new type OwnPtrMember, new type RefPtrMember, new type LastMemberTypeEntry > > > Source/WebCore/inspector/HeapGraphSerializer.cpp:68 > > + : m_refType(0) > > I'd leave it as m_type. done. > > > Source/WebCore/inspector/HeapGraphSerializer.cpp:89 > > + memset(m_refTypes, 0, sizeof(m_refTypes)); > > m_refTypes -> m_edgeTypes. done.
Ilya Tikhonovsky
Comment 6 2012-12-24 23:03:10 PST
Note You need to log in before you can comment on or make changes to this bug.