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

Unified Diff: src/profile-generator.cc

Issue 10830309: Show map -> transition array -> descriptor array to the heap profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adding test Created 8 years, 4 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 | test/cctest/test-heap-profiler.cc » ('j') | 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 1a4139642c9e1a6a65edf12fc0d4a2b8fa627884..87b91e31299bbd645f6c8d627c5169163bc3324e 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -2007,11 +2007,21 @@ 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();
+ if (!transitions->descriptors()->IsEmpty()) {
+ DescriptorArray* descriptors = transitions->descriptors();
+ TagObject(descriptors, "(map descriptors)");
+ SetInternalReference(transitions, entry,
+ "descriptors", descriptors,
+ TransitionArray::kDescriptorsOffset);
+ IndexedReferencesExtractor refs_extractor(
+ this, transitions, entry);
+ transitions->Iterate(&refs_extractor);
+ }
+ TagObject(transitions, "(transition array)");
SetInternalReference(map, entry,
- "descriptors", map->instance_descriptors(),
+ "transitions", transitions,
Map::kTransitionsOrBackPointerOffset);
}
SetInternalReference(map, entry,
« no previous file with comments | « no previous file | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698