Chromium Code Reviews| 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/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1037 return true; | 1037 return true; |
| 1038 } | 1038 } |
| 1039 | 1039 |
| 1040 | 1040 |
| 1041 static bool HandleProfile(Isolate* isolate, JSONStream* js) { | 1041 static bool HandleProfile(Isolate* isolate, JSONStream* js) { |
| 1042 Profiler::PrintToJSONStream(isolate, js, true); | 1042 Profiler::PrintToJSONStream(isolate, js, true); |
| 1043 return true; | 1043 return true; |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 | 1046 |
| 1047 static bool HandleHeap(Isolate* isolate, JSONStream* js) { | |
| 1048 isolate->class_table()->HeapPrintToJSONStream(js); | |
| 1049 return true; | |
| 1050 } | |
| 1051 | |
| 1052 | |
| 1047 static IsolateMessageHandlerEntry isolate_handlers[] = { | 1053 static IsolateMessageHandlerEntry isolate_handlers[] = { |
| 1048 { "_echo", HandleIsolateEcho }, | 1054 { "_echo", HandleIsolateEcho }, |
| 1055 { "heap", HandleHeap }, | |
|
Ivan Posva
2014/01/17 06:53:16
Why twice?
Also "heap"/HandleHeap is a bit of a m
Cutch
2014/01/17 18:37:59
Bad merge.
| |
| 1049 { "classes", HandleClasses }, | 1056 { "classes", HandleClasses }, |
| 1050 { "code", HandleCode }, | 1057 { "code", HandleCode }, |
| 1051 { "debug", HandleDebug }, | 1058 { "debug", HandleDebug }, |
| 1059 { "heap", HandleHeap }, | |
| 1052 { "libraries", HandleLibraries }, | 1060 { "libraries", HandleLibraries }, |
| 1053 { "library", HandleLibrary }, | 1061 { "library", HandleLibrary }, |
| 1054 { "name", HandleName }, | 1062 { "name", HandleName }, |
| 1055 { "objecthistogram", HandleObjectHistogram}, | 1063 { "objecthistogram", HandleObjectHistogram}, |
| 1056 { "objects", HandleObjects }, | 1064 { "objects", HandleObjects }, |
| 1057 { "profile", HandleProfile }, | 1065 { "profile", HandleProfile }, |
| 1058 { "scripts", HandleScripts }, | 1066 { "scripts", HandleScripts }, |
| 1059 { "stacktrace", HandleStackTrace }, | 1067 { "stacktrace", HandleStackTrace }, |
| 1060 }; | 1068 }; |
| 1061 | 1069 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1155 for (intptr_t i = 0; i < num_message_handlers; i++) { | 1163 for (intptr_t i = 0; i < num_message_handlers; i++) { |
| 1156 const RootMessageHandlerEntry& entry = root_handlers[i]; | 1164 const RootMessageHandlerEntry& entry = root_handlers[i]; |
| 1157 if (!strcmp(command, entry.command)) { | 1165 if (!strcmp(command, entry.command)) { |
| 1158 return entry.handler; | 1166 return entry.handler; |
| 1159 } | 1167 } |
| 1160 } | 1168 } |
| 1161 return NULL; | 1169 return NULL; |
| 1162 } | 1170 } |
| 1163 | 1171 |
| 1164 } // namespace dart | 1172 } // namespace dart |
| OLD | NEW |