Index: runtime/vm/service/vmservice.dart |
diff --git a/runtime/vm/service/vmservice.dart b/runtime/vm/service/vmservice.dart |
index 2a6bbc2879ac870eda2bee4e19bc7456426b069f..4566e494f2b535f99b92cd87f3d323985de7a0e8 100644 |
--- a/runtime/vm/service/vmservice.dart |
+++ b/runtime/vm/service/vmservice.dart |
@@ -142,12 +142,17 @@ class VMService extends MessageRouter { |
message.setResponse(JSON.encode(result)); |
} |
+ // TODO(johnmccutchan): Turn this into a command line tool that uses the |
+ // service library. |
Future<String> _getCrashDump() async { |
final perIsolateRequests = [ |
// ?isolateId=<isolate id> will be appended to each of these requests. |
- Uri.parse('getIsolate'), // Isolate information. |
- Uri.parse('_getAllocationProfile'), // State of heap. |
- Uri.parse('getStack?full=true'), // Call stack + local variables. |
+ // Isolate information. |
+ Uri.parse('getIsolate'), |
+ // State of heap. |
+ Uri.parse('_getAllocationProfile'), |
+ // Call stack + local variables. |
+ Uri.parse('getStack?_full=true'), |
]; |
// Snapshot of running isolates. |
@@ -178,6 +183,16 @@ class VMService extends MessageRouter { |
var response = JSON.decode(await isolate.route(message)); |
responses[message.toUri().toString()] = response['result']; |
} |
+ // Dump the object id ring requests. |
+ var message = |
+ new Message.forIsolate(Uri.parse('_dumpIdZone'), isolate); |
+ var response = JSON.decode(await isolate.route(message)); |
+ // Insert getObject requests into responses map. |
+ for (var object in response['result']['objects']) { |
+ final requestUri = |
+ 'getObject&isolateId=${isolate.serviceId}?objectId=${object["id"]}'; |
+ responses[requestUri] = object; |
+ } |
} |
// Encode the entire crash dump. |