| 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);
|
| }
|
|
|
|
|