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

Unified Diff: runtime/vm/heap_test.cc

Issue 487973002: Track per-class promotion stats. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap_test.cc
===================================================================
--- runtime/vm/heap_test.cc (revision 39414)
+++ runtime/vm/heap_test.cc (working copy)
@@ -128,6 +128,8 @@
// Verify postconditions:
EXPECT_EQ(0, class_stats->pre_gc.old_count);
EXPECT_EQ(0, class_stats->post_gc.old_count);
+ // One promoted instance.
+ EXPECT_EQ(1, class_stats->promoted_count);
// Promotion counted as an allocation from old space.
EXPECT_EQ(1, class_stats->recent.old_count);
// There was one instance allocated before GC.
@@ -144,6 +146,8 @@
EXPECT_EQ(0, class_stats->post_gc.new_count);
// No new allocations.
EXPECT_EQ(0, class_stats->recent.new_count);
+ // Nothing was promoted.
+ EXPECT_EQ(0, class_stats->promoted_count);
heap->CollectGarbage(Heap::kOld);
// Verify postconditions:
EXPECT_EQ(1, class_stats->pre_gc.old_count);
« no previous file with comments | « runtime/vm/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698