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

Unified Diff: runtime/vm/service.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/raw_object.h ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
===================================================================
--- runtime/vm/service.cc (revision 35753)
+++ runtime/vm/service.cc (working copy)
@@ -19,6 +19,7 @@
#include "vm/native_entry.h"
#include "vm/native_arguments.h"
#include "vm/object.h"
+#include "vm/object_graph.h"
#include "vm/object_id_ring.h"
#include "vm/object_store.h"
#include "vm/port.h"
@@ -888,6 +889,12 @@
Array::empty_array()));
result.PrintJSON(js, true);
return true;
+ } else if (strcmp(action, "retained") == 0) {
+ ObjectGraph graph(isolate);
+ intptr_t retained_size = graph.SizeRetainedByInstance(obj);
+ const Object& result = Object::Handle(Integer::New(retained_size));
+ result.PrintJSON(js, true);
+ return true;
}
PrintError(js, "unrecognized action '%s'\n", action);
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698