| 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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 Profiler::PrintToJSONStream(isolate, js, true); | 1043 Profiler::PrintToJSONStream(isolate, js, true); |
| 1044 return true; | 1044 return true; |
| 1045 } | 1045 } |
| 1046 | 1046 |
| 1047 static bool HandleCoverage(Isolate* isolate, JSONStream* js) { | 1047 static bool HandleCoverage(Isolate* isolate, JSONStream* js) { |
| 1048 CodeCoverage::PrintToJSONStream(isolate, js); | 1048 CodeCoverage::PrintToJSONStream(isolate, js); |
| 1049 return true; | 1049 return true; |
| 1050 } | 1050 } |
| 1051 | 1051 |
| 1052 | 1052 |
| 1053 static bool HandleAllocationProfile(Isolate* isolate, JSONStream* js) { |
| 1054 isolate->class_table()->AllocationProfilePrintToJSONStream(js); |
| 1055 return true; |
| 1056 } |
| 1057 |
| 1058 |
| 1053 static IsolateMessageHandlerEntry isolate_handlers[] = { | 1059 static IsolateMessageHandlerEntry isolate_handlers[] = { |
| 1054 { "_echo", HandleIsolateEcho }, | 1060 { "_echo", HandleIsolateEcho }, |
| 1061 { "allocationprofile", HandleAllocationProfile }, |
| 1055 { "classes", HandleClasses }, | 1062 { "classes", HandleClasses }, |
| 1056 { "code", HandleCode }, | 1063 { "code", HandleCode }, |
| 1057 { "coverage", HandleCoverage }, | 1064 { "coverage", HandleCoverage }, |
| 1058 { "debug", HandleDebug }, | 1065 { "debug", HandleDebug }, |
| 1059 { "libraries", HandleLibraries }, | 1066 { "libraries", HandleLibraries }, |
| 1060 { "library", HandleLibrary }, | 1067 { "library", HandleLibrary }, |
| 1061 { "name", HandleName }, | 1068 { "name", HandleName }, |
| 1062 { "objecthistogram", HandleObjectHistogram}, | 1069 { "objecthistogram", HandleObjectHistogram}, |
| 1063 { "objects", HandleObjects }, | 1070 { "objects", HandleObjects }, |
| 1064 { "profile", HandleProfile }, | 1071 { "profile", HandleProfile }, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 for (intptr_t i = 0; i < num_message_handlers; i++) { | 1169 for (intptr_t i = 0; i < num_message_handlers; i++) { |
| 1163 const RootMessageHandlerEntry& entry = root_handlers[i]; | 1170 const RootMessageHandlerEntry& entry = root_handlers[i]; |
| 1164 if (!strcmp(command, entry.command)) { | 1171 if (!strcmp(command, entry.command)) { |
| 1165 return entry.handler; | 1172 return entry.handler; |
| 1166 } | 1173 } |
| 1167 } | 1174 } |
| 1168 return NULL; | 1175 return NULL; |
| 1169 } | 1176 } |
| 1170 | 1177 |
| 1171 } // namespace dart | 1178 } // namespace dart |
| OLD | NEW |