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

Side by Side Diff: runtime/vm/service.cc

Issue 51653006: Track live instance and allocation counts for classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 HandleAllocationProfile(Isolate* isolate, JSONStream* js) {
1048 isolate->class_table()->AllocationProfilePrintToJSONStream(js);
1049 return true;
1050 }
1051
1052
1047 static IsolateMessageHandlerEntry isolate_handlers[] = { 1053 static IsolateMessageHandlerEntry isolate_handlers[] = {
1048 { "_echo", HandleIsolateEcho }, 1054 { "_echo", HandleIsolateEcho },
1049 { "classes", HandleClasses }, 1055 { "classes", HandleClasses },
1050 { "code", HandleCode }, 1056 { "code", HandleCode },
1051 { "debug", HandleDebug }, 1057 { "debug", HandleDebug },
1058 { "allocationprofile", HandleAllocationProfile },
Ivan Posva 2014/01/21 21:40:00 Sorted order?
Cutch 2014/01/21 23:44:06 Done.
1052 { "libraries", HandleLibraries }, 1059 { "libraries", HandleLibraries },
1053 { "library", HandleLibrary }, 1060 { "library", HandleLibrary },
1054 { "name", HandleName }, 1061 { "name", HandleName },
1055 { "objecthistogram", HandleObjectHistogram}, 1062 { "objecthistogram", HandleObjectHistogram},
1056 { "objects", HandleObjects }, 1063 { "objects", HandleObjects },
1057 { "profile", HandleProfile }, 1064 { "profile", HandleProfile },
1058 { "scripts", HandleScripts }, 1065 { "scripts", HandleScripts },
1059 { "stacktrace", HandleStackTrace }, 1066 { "stacktrace", HandleStackTrace },
1060 }; 1067 };
1061 1068
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 for (intptr_t i = 0; i < num_message_handlers; i++) { 1162 for (intptr_t i = 0; i < num_message_handlers; i++) {
1156 const RootMessageHandlerEntry& entry = root_handlers[i]; 1163 const RootMessageHandlerEntry& entry = root_handlers[i];
1157 if (!strcmp(command, entry.command)) { 1164 if (!strcmp(command, entry.command)) {
1158 return entry.handler; 1165 return entry.handler;
1159 } 1166 }
1160 } 1167 }
1161 return NULL; 1168 return NULL;
1162 } 1169 }
1163 1170
1164 } // namespace dart 1171 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698