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.
Created attachment 180675 [details] Patch
Comment on attachment 180675 [details] Patch Attachment 180675 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15496533
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.
Created attachment 180698 [details] Patch
(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.
Committed r138452: <http://trac.webkit.org/changeset/138452>