| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of service; | 5 part of service; |
| 6 | 6 |
| 7 /// An RpcException represents an exceptional event that happened | 7 /// An RpcException represents an exceptional event that happened |
| 8 /// while invoking an rpc. | 8 /// while invoking an rpc. |
| 9 abstract class RpcException implements Exception { | 9 abstract class RpcException implements Exception { |
| 10 RpcException(this.message); | 10 RpcException(this.message); |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 final Isolate isolate; | 826 final Isolate isolate; |
| 827 | 827 |
| 828 HeapSnapshot(this.isolate, chunks, nodeCount) : | 828 HeapSnapshot(this.isolate, chunks, nodeCount) : |
| 829 graph = new ObjectGraph(chunks, nodeCount), | 829 graph = new ObjectGraph(chunks, nodeCount), |
| 830 timeStamp = new DateTime.now(); | 830 timeStamp = new DateTime.now(); |
| 831 | 831 |
| 832 List<Future<ServiceObject>> getMostRetained({int classId, int limit}) { | 832 List<Future<ServiceObject>> getMostRetained({int classId, int limit}) { |
| 833 var result = []; | 833 var result = []; |
| 834 for (ObjectVertex v in graph.getMostRetained(classId: classId, | 834 for (ObjectVertex v in graph.getMostRetained(classId: classId, |
| 835 limit: limit)) { | 835 limit: limit)) { |
| 836 result.add(isolate.getObjectByAddress(v.address.toRadixString(16)) | 836 result.add(isolate.getObjectByAddress(v.address) |
| 837 .then((ServiceObject obj) { | 837 .then((ServiceObject obj) { |
| 838 if (obj is Instance) { | 838 if (obj is Instance) { |
| 839 // TODO(rmacnak): size/retainedSize are properties of all heap | 839 // TODO(rmacnak): size/retainedSize are properties of all heap |
| 840 // objects, not just Instances. | 840 // objects, not just Instances. |
| 841 obj.retainedSize = v.retainedSize; | 841 obj.retainedSize = v.retainedSize; |
| 842 } | 842 } |
| 843 return obj; | 843 return obj; |
| 844 })); | 844 })); |
| 845 } | 845 } |
| 846 return result; | 846 return result; |
| (...skipping 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3453 var v = list[i]; | 3453 var v = list[i]; |
| 3454 if ((v is ObservableMap) && _isServiceMap(v)) { | 3454 if ((v is ObservableMap) && _isServiceMap(v)) { |
| 3455 list[i] = owner.getFromMap(v); | 3455 list[i] = owner.getFromMap(v); |
| 3456 } else if (v is ObservableList) { | 3456 } else if (v is ObservableList) { |
| 3457 _upgradeObservableList(v, owner); | 3457 _upgradeObservableList(v, owner); |
| 3458 } else if (v is ObservableMap) { | 3458 } else if (v is ObservableMap) { |
| 3459 _upgradeObservableMap(v, owner); | 3459 _upgradeObservableMap(v, owner); |
| 3460 } | 3460 } |
| 3461 } | 3461 } |
| 3462 } | 3462 } |
| OLD | NEW |