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

Unified Diff: runtime/vm/object_graph_test.cc

Issue 263803009: Retained size for instance in Observatory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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/object_graph.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_graph_test.cc
===================================================================
--- runtime/vm/object_graph_test.cc (revision 35753)
+++ runtime/vm/object_graph_test.cc (working copy)
@@ -53,8 +53,10 @@
b.SetAt(0, c);
b.SetAt(1, d);
a.SetAt(1, d);
+ intptr_t a_size = a.raw()->Size();
intptr_t b_size = b.raw()->Size();
intptr_t c_size = c.raw()->Size();
+ intptr_t d_size = d.raw()->Size();
{
// No more allocation; raw pointers ahead.
NoGCScope no_gc_scope;
@@ -86,6 +88,8 @@
EXPECT_EQ(b_size + c_size,
with.size() - without.size());
}
+ EXPECT_EQ(a_size + b_size + c_size + d_size,
+ graph.SizeRetainedByInstance(a));
}
}
« no previous file with comments | « runtime/vm/object_graph.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698