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

Unified Diff: runtime/vm/service/vmservice.dart

Issue 1132323002: Add Service ID zones to service protocol (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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/vm/service/service.idl ('k') | runtime/vm/service_isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « runtime/vm/service/service.idl ('k') | runtime/vm/service_isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698