Commit 7e6f6537 authored by loislo@chromium.org's avatar loislo@chromium.org

HeapProfiler: remove obsolete AddImplicitReferences

it hasn't been used since r149579. More than one year ago.

BUG=
R=marja@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/505983002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5164b9a4
......@@ -845,23 +845,6 @@ void GlobalHandles::SetRetainedObjectInfo(UniqueId id,
}
void GlobalHandles::AddImplicitReferences(HeapObject** parent,
Object*** children,
size_t length) {
#ifdef DEBUG
DCHECK(!Node::FromLocation(BitCast<Object**>(parent))->is_independent());
for (size_t i = 0; i < length; ++i) {
DCHECK(!Node::FromLocation(children[i])->is_independent());
}
#endif
if (length == 0) return;
ImplicitRefGroup* group = new ImplicitRefGroup(parent, length);
for (size_t i = 0; i < length; ++i)
group->children[i] = children[i];
implicit_ref_groups_.Add(group);
}
void GlobalHandles::SetReferenceFromGroup(UniqueId id, Object** child) {
DCHECK(!Node::FromLocation(child)->is_independent());
implicit_ref_connections_.Add(ObjectGroupConnection(id, child));
......
......@@ -215,13 +215,6 @@ class GlobalHandles {
// handles.
void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info);
// Add an implicit references' group.
// Should be only used in GC callback function before a collection.
// All groups are destroyed after a mark-compact collection.
void AddImplicitReferences(HeapObject** parent,
Object*** children,
size_t length);
// Adds an implicit reference from a group to an object. Should be only used
// in GC callback function before a collection. All implicit references are
// destroyed after a mark-compact collection.
......
......@@ -301,15 +301,13 @@ TEST(ObjectGroups) {
{
Object** g1_objects[] = { g1s1.location(), g1s2.location() };
Object** g1_children[] = { g1c1.location() };
Object** g2_objects[] = { g2s1.location(), g2s2.location() };
Object** g2_children[] = { g2c1.location() };
global_handles->AddObjectGroup(g1_objects, 2, NULL);
global_handles->AddImplicitReferences(
Handle<HeapObject>::cast(g1s1).location(), g1_children, 1);
global_handles->SetReference(Handle<HeapObject>::cast(g1s1).location(),
g1c1.location());
global_handles->AddObjectGroup(g2_objects, 2, NULL);
global_handles->AddImplicitReferences(
Handle<HeapObject>::cast(g2s1).location(), g2_children, 1);
global_handles->SetReference(Handle<HeapObject>::cast(g2s1).location(),
g2c1.location());
}
// Do a full GC
heap->CollectGarbage(OLD_POINTER_SPACE);
......@@ -330,15 +328,13 @@ TEST(ObjectGroups) {
// Groups are deleted, rebuild groups.
{
Object** g1_objects[] = { g1s1.location(), g1s2.location() };
Object** g1_children[] = { g1c1.location() };
Object** g2_objects[] = { g2s1.location(), g2s2.location() };
Object** g2_children[] = { g2c1.location() };
global_handles->AddObjectGroup(g1_objects, 2, NULL);
global_handles->AddImplicitReferences(
Handle<HeapObject>::cast(g1s1).location(), g1_children, 1);
global_handles->SetReference(Handle<HeapObject>::cast(g1s1).location(),
g1c1.location());
global_handles->AddObjectGroup(g2_objects, 2, NULL);
global_handles->AddImplicitReferences(
Handle<HeapObject>::cast(g2s1).location(), g2_children, 1);
global_handles->SetReference(Handle<HeapObject>::cast(g2s1).location(),
g2c1.location());
}
heap->CollectGarbage(OLD_POINTER_SPACE);
......@@ -389,15 +385,9 @@ TEST(EmptyObjectGroups) {
v8::HandleScope handle_scope(CcTest::isolate());
Handle<Object> object = global_handles->Create(
CcTest::test_heap()->AllocateFixedArray(1).ToObjectChecked());
TestRetainedObjectInfo info;
global_handles->AddObjectGroup(NULL, 0, &info);
DCHECK(info.has_been_disposed());
global_handles->AddImplicitReferences(
Handle<HeapObject>::cast(object).location(), NULL, 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment