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

Unified Diff: src/heap-snapshot-generator.cc

Issue 139973004: A64: Synchronize with r15814. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | « src/heap.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-snapshot-generator.cc
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc
index 6d2d8912f1a3bd50b9cd6872b84b7a66a7210787..3b1f235e7542ed006d5cdb6cbdb165f3f6f65895 100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -892,7 +892,12 @@ class IndexedReferencesExtractor : public ObjectVisitor {
: generator_(generator),
parent_obj_(parent_obj),
parent_(parent),
- next_index_(1) {
+ next_index_(0) {
+ }
+ void VisitCodeEntry(Address entry_address) {
+ Code* code = Code::cast(Code::GetObjectFromEntryAddress(entry_address));
+ generator_->SetInternalReference(parent_obj_, parent_, "code", code);
+ generator_->TagObject(code, "(code)");
}
void VisitPointers(Object** start, Object** end) {
for (Object** p = start; p < end; p++) {
@@ -997,6 +1002,9 @@ void V8HeapExplorer::ExtractJSObjectReferences(
SetPropertyReference(
obj, entry,
heap_->prototype_string(), js_fun->prototype());
+ SetInternalReference(
+ obj, entry, "initial_map", proto_or_map,
+ JSFunction::kPrototypeOrInitialMapOffset);
}
}
SharedFunctionInfo* shared_info = js_fun->shared();
@@ -1139,6 +1147,10 @@ void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
SetInternalReference(map, entry,
"constructor", map->constructor(),
Map::kConstructorOffset);
+ TagObject(map->dependent_code(), "(dependent code)");
+ SetInternalReference(map, entry,
+ "dependent_code", map->dependent_code(),
+ Map::kDependentCodeOffset);
}
@@ -1673,13 +1685,14 @@ void V8HeapExplorer::SetWeakReference(HeapObject* parent_obj,
int field_offset) {
ASSERT(parent_entry == GetEntry(parent_obj)->index());
HeapEntry* child_entry = GetEntry(child_obj);
- if (child_entry != NULL) {
+ if (child_entry == NULL) return;
+ if (IsEssentialObject(child_obj)) {
filler_->SetIndexedReference(HeapGraphEdge::kWeak,
parent_entry,
index,
child_entry);
- IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset);
}
+ IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset);
}
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698