| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 #include "vm/service.h" | 5 #include "vm/service.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/coverage.h" | 10 #include "vm/coverage.h" |
| (...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 | 1266 |
| 1267 static bool HandleUnpin(Isolate* isolate, JSONStream* js) { | 1267 static bool HandleUnpin(Isolate* isolate, JSONStream* js) { |
| 1268 // TODO(johnmccutchan): What do I respond with?? | 1268 // TODO(johnmccutchan): What do I respond with?? |
| 1269 isolate->ClosePinPort(); | 1269 isolate->ClosePinPort(); |
| 1270 return true; | 1270 return true; |
| 1271 } | 1271 } |
| 1272 | 1272 |
| 1273 | 1273 |
| 1274 static bool HandleHeapMap(Isolate* isolate, JSONStream* js) { |
| 1275 isolate->heap()->PrintHeapMapToJSONStream(js); |
| 1276 return true; |
| 1277 } |
| 1278 |
| 1279 |
| 1274 static IsolateMessageHandlerEntry isolate_handlers[] = { | 1280 static IsolateMessageHandlerEntry isolate_handlers[] = { |
| 1275 { "_echo", HandleIsolateEcho }, | 1281 { "_echo", HandleIsolateEcho }, |
| 1276 { "", HandleIsolate }, | 1282 { "", HandleIsolate }, |
| 1277 { "allocationprofile", HandleAllocationProfile }, | 1283 { "allocationprofile", HandleAllocationProfile }, |
| 1278 { "classes", HandleClasses }, | 1284 { "classes", HandleClasses }, |
| 1279 { "code", HandleCode }, | 1285 { "code", HandleCode }, |
| 1280 { "coverage", HandleCoverage }, | 1286 { "coverage", HandleCoverage }, |
| 1281 { "cpu", HandleCpu }, | 1287 { "cpu", HandleCpu }, |
| 1282 { "debug", HandleDebug }, | 1288 { "debug", HandleDebug }, |
| 1289 { "heapmap", HandleHeapMap }, |
| 1283 { "libraries", HandleLibraries }, | 1290 { "libraries", HandleLibraries }, |
| 1284 { "objects", HandleObjects }, | 1291 { "objects", HandleObjects }, |
| 1285 { "profile", HandleProfile }, | 1292 { "profile", HandleProfile }, |
| 1286 { "unpin", HandleUnpin }, | 1293 { "unpin", HandleUnpin }, |
| 1287 { "scripts", HandleScripts }, | 1294 { "scripts", HandleScripts }, |
| 1288 { "stacktrace", HandleStackTrace }, | 1295 { "stacktrace", HandleStackTrace }, |
| 1289 }; | 1296 }; |
| 1290 | 1297 |
| 1291 | 1298 |
| 1292 static IsolateMessageHandler FindIsolateMessageHandler(const char* command) { | 1299 static IsolateMessageHandler FindIsolateMessageHandler(const char* command) { |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1498 while (current != NULL) { | 1505 while (current != NULL) { |
| 1499 if (strcmp(name, current->name()) == 0) { | 1506 if (strcmp(name, current->name()) == 0) { |
| 1500 return current; | 1507 return current; |
| 1501 } | 1508 } |
| 1502 current = current->next(); | 1509 current = current->next(); |
| 1503 } | 1510 } |
| 1504 return NULL; | 1511 return NULL; |
| 1505 } | 1512 } |
| 1506 | 1513 |
| 1507 } // namespace dart | 1514 } // namespace dart |
| OLD | NEW |