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

Unified Diff: runtime/observatory/lib/src/service/object.dart

Issue 1161553013: Address hints in the Observatory. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/observatory/lib/object_graph.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/service/object.dart
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index d2c970371707dacb378dfda71c53e6431c451d37..fb00c27baee61161b2ecffc41b360a5429dda951 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -788,11 +788,16 @@ class HeapSnapshot {
List<Future<ServiceObject>> getMostRetained({int classId, int limit}) {
var result = [];
- for (var v in graph.getMostRetained(classId: classId, limit: limit)) {
- var address = v.addressForWordSize(isolate.vm.architectureBits ~/ 8);
- result.add(isolate.getObjectByAddress(address.toRadixString(16)).then((obj) {
- obj.retainedSize = v.retainedSize;
- return new Future(() => obj);
+ for (ObjectVertex v in graph.getMostRetained(classId: classId,
+ limit: limit)) {
+ result.add(isolate.getObjectByAddress(v.address.toRadixString(16))
+ .then((ServiceObject obj) {
+ if (obj is Instance) {
+ // TODO(rmacnak): size/retainedSize are properties of all heap
+ // objects, not just Instances.
+ obj.retainedSize = v.retainedSize;
+ }
+ return obj;
}));
}
return result;
« no previous file with comments | « runtime/observatory/lib/object_graph.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698