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

Unified Diff: runtime/observatory/lib/src/elements/class_view.dart

Issue 818733002: Rank most retaining instances for each class. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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
Index: runtime/observatory/lib/src/elements/class_view.dart
===================================================================
--- runtime/observatory/lib/src/elements/class_view.dart (revision 42649)
+++ runtime/observatory/lib/src/elements/class_view.dart (working copy)
@@ -14,6 +14,7 @@
@published Class cls;
@observable ServiceMap instances;
@observable int retainedBytes;
+ @observable ObservableList mostRetained;
ClassViewElement.created() : super.created();
Future<ServiceObject> eval(String text) {
@@ -26,6 +27,16 @@
instances = obj;
});
}
+
+ Future<ServiceObject> retainedToplist(var limit) {
+ return cls.isolate.fetchHeapSnapshot().then(
+ (HeapSnapshot snapshot) =>
+ Future.wait(snapshot.getMostRetained(classId: cls.vmCid,
+ limit: 10))).then(
+ (List<ServiceObject> most) {
+ mostRetained = new ObservableList.from(most);
+ });
+ }
// TODO(koda): Add no-arg "calculate-link" instead of reusing "eval-link".
Future<ServiceObject> retainedSize(var dummy) {
@@ -37,6 +48,7 @@
void refresh(var done) {
instances = null;
retainedBytes = null;
+ mostRetained = null;
cls.reload().whenComplete(done);
}
« no previous file with comments | « runtime/observatory/lib/src/app/application.dart ('k') | runtime/observatory/lib/src/elements/class_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698