Reviewers: Yury Semikhatsky,

Message:
PTAL.

Description:
Show map -> transition array -> descriptor array to the heap profiler.


BUG=chromium:142625


Please review this at https://chromiumcodereview.appspot.com/10830309/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/profile-generator.cc


Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index 1a4139642c9e1a6a65edf12fc0d4a2b8fa627884..c062651c5615dec735288b5013ff20b5a3ca3b76 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -2007,11 +2007,24 @@ void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
   SetInternalReference(map, entry,
                        "constructor", map->constructor(),
                        Map::kConstructorOffset);
-  if (!map->instance_descriptors()->IsEmpty()) {
-    TagObject(map->instance_descriptors(), "(map descriptors)");
-    // TODO(verwaest): Check what to do here.
+  if (map->HasTransitionArray()) {
+    TransitionArray* transitions = map->transitions();
+    HeapEntry* transitions_entry = GetEntry(transitions);
+    if (transitions_entry != NULL &&
+        !transitions->descriptors()->IsEmpty()) {
+      int transitions_index = transitions_entry->index();
+      DescriptorArray* descriptors = transitions->descriptors();
+      TagObject(descriptors, "(map descriptors)");
+      SetInternalReference(transitions, transitions_index,
+                           "descriptors", descriptors,
+                           TransitionArray::kDescriptorsOffset);
+      IndexedReferencesExtractor refs_extractor(
+          this, transitions, transitions_index);
+      transitions->Iterate(&refs_extractor);
+    }
+    TagObject(transitions, "(transition array)");
     SetInternalReference(map, entry,
-                         "descriptors", map->instance_descriptors(),
+                         "transitions", transitions,
                          Map::kTransitionsOrBackPointerOffset);
   }
   SetInternalReference(map, entry,


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to