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

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

Issue 173013004: Add accumulator to allocation profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/coverage.h" 10 #include "vm/coverage.h"
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 return true; 1079 return true;
1080 } 1080 }
1081 1081
1082 static bool HandleCoverage(Isolate* isolate, JSONStream* js) { 1082 static bool HandleCoverage(Isolate* isolate, JSONStream* js) {
1083 CodeCoverage::PrintToJSONStream(isolate, js); 1083 CodeCoverage::PrintToJSONStream(isolate, js);
1084 return true; 1084 return true;
1085 } 1085 }
1086 1086
1087 1087
1088 static bool HandleAllocationProfile(Isolate* isolate, JSONStream* js) { 1088 static bool HandleAllocationProfile(Isolate* isolate, JSONStream* js) {
1089 if (js->num_arguments() == 2) {
1090 const char* sub_command = js->GetArgument(1);
1091 if (!strcmp(sub_command, "reset")) {
1092 isolate->class_table()->ResetAllocationAccumulators();
1093 isolate->class_table()->AllocationProfilePrintToJSONStream(js);
1094 return true;
1095 } else {
1096 PrintError(js, "Unrecognized subcommand '%s'", sub_command);
1097 return true;
1098 }
1099 }
1100 if (js->num_arguments() != 1) {
1101 PrintError(js, "Command too long");
1102 return true;
1103 }
1089 isolate->class_table()->AllocationProfilePrintToJSONStream(js); 1104 isolate->class_table()->AllocationProfilePrintToJSONStream(js);
1090 return true; 1105 return true;
1091 } 1106 }
1092 1107
1093 1108
1094 static bool HandleUnpin(Isolate* isolate, JSONStream* js) { 1109 static bool HandleUnpin(Isolate* isolate, JSONStream* js) {
1095 // TODO(johnmccutchan): What do I respond with?? 1110 // TODO(johnmccutchan): What do I respond with??
1096 isolate->ClosePinPort(); 1111 isolate->ClosePinPort();
1097 return true; 1112 return true;
1098 } 1113 }
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 while (current != NULL) { 1341 while (current != NULL) {
1327 if (!strcmp(name, current->name())) { 1342 if (!strcmp(name, current->name())) {
1328 return current; 1343 return current;
1329 } 1344 }
1330 current = current->next(); 1345 current = current->next();
1331 } 1346 }
1332 return NULL; 1347 return NULL;
1333 } 1348 }
1334 1349
1335 } // namespace dart 1350 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698