Index: src/profile-generator.cc |
=================================================================== |
--- src/profile-generator.cc (revision 10596) |
+++ src/profile-generator.cc (working copy) |
@@ -2782,6 +2782,27 @@ |
embedder_queried_ = true; |
} |
+void NativeObjectsExplorer::FillImplicitReferences() { |
+ Isolate* isolate = Isolate::Current(); |
+ List<ImplicitRefGroup*>* groups = |
+ isolate->global_handles()->implicit_ref_groups(); |
+ for (int i = 0; i < groups->length(); ++i) { |
+ ImplicitRefGroup* group = groups->at(i); |
+ HeapObject* parent = *group->parent_; |
+ HeapEntry* parent_entry = filler_->FindOrAddEntry(parent, this); |
+ ASSERT(parent_entry != NULL); |
+ Object*** children = group->children_; |
+ for (size_t j = 0; j < group->length_; ++j) { |
+ Object* child = *children[j]; |
+ HeapEntry* child_entry = filler_->FindOrAddEntry(child, this); |
+ filler_->SetNamedReference( |
+ HeapGraphEdge::kInternal, |
+ parent, parent_entry, |
+ "native", |
mnaganov (inactive)
2012/02/03 13:57:19
Does this look descriptive enough? If implicit ref
yurys
2012/02/03 14:09:26
For now it seems good enough. We cannot assume tha
|
+ child, child_entry); |
+ } |
+ } |
+} |
List<HeapObject*>* NativeObjectsExplorer::GetListMaybeDisposeInfo( |
v8::RetainedObjectInfo* info) { |
@@ -2798,9 +2819,13 @@ |
bool NativeObjectsExplorer::IterateAndExtractReferences( |
SnapshotFillerInterface* filler) { |
- if (EstimateObjectsCount() <= 0) return true; |
filler_ = filler; |
FillRetainedObjects(); |
+ FillImplicitReferences(); |
+ if (EstimateObjectsCount() <= 0) { |
mnaganov (inactive)
2012/02/03 13:57:19
Let's rewrite this as follows to avoid cleanup cod
yurys
2012/02/03 14:09:26
Done.
|
+ filler_ = NULL; |
+ return true; |
+ } |
for (HashMap::Entry* p = objects_by_info_.Start(); |
p != NULL; |
p = objects_by_info_.Next(p)) { |