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

Unified Diff: runtime/vm/class_table.cc

Issue 249843003: Fix accumulated size stats for fixed-size instances. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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/class_table.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_table.cc
===================================================================
--- runtime/vm/class_table.cc (revision 35314)
+++ runtime/vm/class_table.cc (working copy)
@@ -221,15 +221,11 @@
void ClassHeapStats::UpdateSize(intptr_t instance_size) {
- ASSERT(instance_size > 0);
- // For classes with fixed instance size we do not emit code to update
- // the size statistics. Update them here.
- pre_gc.old_size = pre_gc.old_count * instance_size;
- pre_gc.new_size = pre_gc.new_count * instance_size;
- post_gc.old_size = post_gc.old_count * instance_size;
- post_gc.new_size = post_gc.new_count * instance_size;
- recent.new_size = recent.new_count * instance_size;
- recent.old_size = recent.old_count * instance_size;
+ pre_gc.UpdateSize(instance_size);
+ post_gc.UpdateSize(instance_size);
+ recent.UpdateSize(instance_size);
+ accumulated.UpdateSize(instance_size);
+ last_reset.UpdateSize(instance_size);
}
« no previous file with comments | « runtime/vm/class_table.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698