Ejemplo n.º 1
0
void HeapGraphSerializer::reportNode(const WTF::MemoryObjectInfo& info)
{
    ASSERT(info.reportedPointer());
    reportNodeImpl(info, m_nodeEdgesCount);
    m_nodeEdgesCount = 0;
    if (info.isRoot())
        m_roots.append(info.reportedPointer());
    pushUpdateIfNeeded();
}
Ejemplo n.º 2
0
int HeapGraphSerializer::reportNodeImpl(const WTF::MemoryObjectInfo& info, int edgesCount)
{
    int nodeId = toNodeId(info.reportedPointer());
    int classNameId = info.classNameId();
    m_nodes->addItem(classNameId ? classNameId : m_unknownClassNameId);
    m_nodes->addItem(info.nameId());
    m_nodes->addItem(nodeId);
    m_nodes->addItem(info.objectSize());
    m_nodes->addItem(edgesCount);

    return nodeId;
}
Ejemplo n.º 3
0
void HeapGraphSerializer::reportNode(const WTF::MemoryObjectInfo& info)
{
    HeapGraphNode node;
    node.m_type = addString(info.objectType());
    node.m_size = info.objectSize();
    node.m_className = addString(info.className());
    node.m_name = addString(info.name());
    // Node is always reported after its outgoing edges and leaves.
    node.m_edgeCount = m_edges.size() - m_lastReportedEdgeIndex;
    m_lastReportedEdgeIndex = m_edges.size();

    m_objectToNodeIndex.set(info.reportedPointer(), m_nodes.size());
    m_nodes.append(node);
}