Index: runtime/vm/class_table.cc |
=================================================================== |
--- runtime/vm/class_table.cc (revision 41855) |
+++ runtime/vm/class_table.cc (working copy) |
@@ -212,6 +212,7 @@ |
void ClassHeapStats::ResetAtNewGC() { |
+ Verify(); |
pre_gc.new_count = post_gc.new_count + recent.new_count; |
pre_gc.new_size = post_gc.new_size + recent.new_size; |
// Accumulate allocations. |
@@ -226,6 +227,7 @@ |
void ClassHeapStats::ResetAtOldGC() { |
+ Verify(); |
pre_gc.old_count = post_gc.old_count + recent.old_count; |
pre_gc.old_size = post_gc.old_size + recent.old_size; |
// Accumulate allocations. |
@@ -237,6 +239,15 @@ |
} |
+void ClassHeapStats::Verify() { |
+ pre_gc.Verify(); |
+ post_gc.Verify(); |
+ recent.Verify(); |
+ accumulated.Verify(); |
+ last_reset.Verify(); |
+} |
+ |
+ |
void ClassHeapStats::UpdateSize(intptr_t instance_size) { |
pre_gc.UpdateSize(instance_size); |
post_gc.UpdateSize(instance_size); |
@@ -345,6 +356,7 @@ |
if (ShouldUpdateSizeForClassId(cid)) { |
stats->UpdateSize(cls.instance_size()); |
} |
+ stats->Verify(); |
return stats; |
} |