Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(896)

Unified Diff: Source/core/inspector/HeapGraphSerializer.cpp

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/HeapGraphSerializer.h ('k') | Source/core/inspector/InspectorAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/HeapGraphSerializer.cpp
diff --git a/Source/core/inspector/HeapGraphSerializer.cpp b/Source/core/inspector/HeapGraphSerializer.cpp
index b77c0272e87474b0145826a1e36765b3bcb1fda2..fec965dd85d196e61ef88c9b3270bfca326b8e7b 100644
--- a/Source/core/inspector/HeapGraphSerializer.cpp
+++ b/Source/core/inspector/HeapGraphSerializer.cpp
@@ -33,10 +33,6 @@
#include "HeapGraphSerializer.h"
-#include "WebCoreMemoryInstrumentation.h"
-#include <wtf/MemoryInstrumentationHashMap.h>
-#include <wtf/MemoryInstrumentationVector.h>
-#include <wtf/MemoryObjectInfo.h>
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
@@ -55,11 +51,6 @@ HeapGraphSerializer::HeapGraphSerializer(Client* client)
ASSERT(m_client);
m_strings->addItem(String()); // An empty string with 0 index.
- memset(m_edgeTypes, 0, sizeof(m_edgeTypes));
-
- m_edgeTypes[WTF::PointerMember] = registerTypeString("weak");
- m_edgeTypes[WTF::RetainingPointer] = registerTypeString("property");
-
// FIXME: It is used as a magic constant for 'object' node type.
registerTypeString("object");
@@ -102,40 +93,9 @@ void HeapGraphSerializer::pushUpdate()
m_baseToRealNodeIdMap = BaseToRealNodeIdMap::create();
}
-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();
-}
-
-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;
-}
-
-void HeapGraphSerializer::reportEdge(const void* to, const char* name, WTF::MemberType memberType)
-{
- ASSERT(to);
- reportEdgeImpl(toNodeId(to), name, m_edgeTypes[memberType]);
- pushUpdateIfNeeded();
-}
-
void HeapGraphSerializer::reportEdgeImpl(const int toNodeId, const char* name, int memberType)
{
ASSERT(memberType >= 0);
- ASSERT(memberType < WTF::LastMemberTypeEntry);
m_edges->addItem(memberType);
m_edges->addItem(registerString(name));
@@ -144,13 +104,6 @@ void HeapGraphSerializer::reportEdgeImpl(const int toNodeId, const char* name, i
++m_nodeEdgesCount;
}
-void HeapGraphSerializer::reportLeaf(const WTF::MemoryObjectInfo& info, const char* edgeName)
-{
- int nodeId = reportNodeImpl(info, 0);
- reportEdgeImpl(nodeId, edgeName, m_edgeTypes[WTF::RetainingPointer]);
- pushUpdateIfNeeded();
-}
-
void HeapGraphSerializer::reportBaseAddress(const void* base, const void* real)
{
m_baseToRealNodeIdMap->addItem(toNodeId(base));
@@ -197,17 +150,6 @@ PassRefPtr<InspectorObject> HeapGraphSerializer::finish()
return meta.release();
}
-void HeapGraphSerializer::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
-{
- MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Inspector);
- info.ignoreMember(m_stringToIndex);
- info.ignoreMember(m_strings);
- info.ignoreMember(m_edges);
- info.ignoreMember(m_nodes);
- info.ignoreMember(m_baseToRealNodeIdMap);
- info.ignoreMember(m_roots);
-}
-
int HeapGraphSerializer::registerString(const char* string)
{
if (!string)
@@ -239,9 +181,6 @@ int HeapGraphSerializer::toNodeId(const void* to)
void HeapGraphSerializer::addRootNode()
{
- for (size_t i = 0; i < m_roots.size(); i++)
- reportEdgeImpl(toNodeId(m_roots[i]), 0, m_edgeTypes[WTF::PointerMember]);
-
m_nodes->addItem(registerString("Root"));
m_nodes->addItem(0);
m_nodes->addItem(s_firstNodeId + m_address2NodeIdMap.size() + m_leafCount);
« no previous file with comments | « Source/core/inspector/HeapGraphSerializer.h ('k') | Source/core/inspector/InspectorAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698