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

Unified Diff: src/profile-generator.cc

Issue 10021052: Hide internal references pointing to the empty array in heap profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Minor change. Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index f0aaa499e72527f6a08d0cc284e7a98fd59381c0..874511e36ab14614e1d44970f14911d921aa9ed4 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -2519,15 +2519,17 @@ void V8HeapExplorer::SetInternalReference(HeapObject* parent_obj,
Object* child_obj,
int field_offset) {
HeapEntry* child_entry = GetEntry(child_obj);
- if (child_entry != NULL) {
+ if (child_entry == NULL) return;
+ // We have to use raw_unchecked_* version because when the
+ // empty_fixed_array itself is being processed all its inline properties
+ // are invalid and the check in empty_fixed_array() function fails.
+ if (child_obj != heap_->raw_unchecked_empty_fixed_array()) {
filler_->SetNamedReference(HeapGraphEdge::kInternal,
- parent_obj,
- parent_entry,
+ parent_obj, parent_entry,
reference_name,
- child_obj,
- child_entry);
- IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset);
+ child_obj, child_entry);
}
+ IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset);
}
@@ -2537,15 +2539,15 @@ void V8HeapExplorer::SetInternalReference(HeapObject* parent_obj,
Object* child_obj,
int field_offset) {
HeapEntry* child_entry = GetEntry(child_obj);
- if (child_entry != NULL) {
+ if (child_entry == NULL) return;
+ // See the comment regarding raw_unchecked_* above.
+ if (child_obj != heap_->raw_unchecked_empty_fixed_array()) {
filler_->SetNamedReference(HeapGraphEdge::kInternal,
- parent_obj,
- parent_entry,
+ parent_obj, parent_entry,
collection_->names()->GetName(index),
- child_obj,
- child_entry);
- IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset);
+ child_obj, child_entry);
}
+ IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698