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

Unified Diff: runtime/vm/heap_profiler.cc

Issue 11880004: - Start adding meta data for fields of VM internal classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/dart.cc ('k') | runtime/vm/object.h » ('j') | runtime/vm/object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap_profiler.cc
===================================================================
--- runtime/vm/heap_profiler.cc (revision 16939)
+++ runtime/vm/heap_profiler.cc (working copy)
@@ -522,8 +522,12 @@
}
}
// instance size (in bytes)
- // TODO(cshapiro): properly account for variable sized objects
- sub.Write32(raw_class->ptr()->instance_size_in_words_);
+ intptr_t instance_size_in_words = raw_class->ptr()->instance_size_in_words_;
+ if (instance_size_in_words == 0) {
+ // TODO(iposva): Better accounting of variable sized VM classes.
+ instance_size_in_words = num_instance_fields;
+ }
+ sub.Write32(instance_size_in_words * kWordSize);
// size of constant pool and number of records that follow:
sub.Write16(0);
// Number of static fields
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/object.h » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698