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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
« runtime/vm/class_table.h ('K') | « runtime/vm/json_stream.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 92955d3660df8cbd8ca6efa2107b320cadf178c2..d5dd577bf760c15d9675a9e5561d844720c2d1ef 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -1077,6 +1077,21 @@ static bool HandleCoverage(Isolate* isolate, JSONStream* js) {
static bool HandleAllocationProfile(Isolate* isolate, JSONStream* js) {
+ if (js->num_arguments() == 2) {
+ const char* sub_command = js->GetArgument(1);
+ if (!strcmp(sub_command, "reset")) {
+ isolate->class_table()->ResetAllocationAccumulators();
+ isolate->class_table()->AllocationProfilePrintToJSONStream(js);
+ return true;
+ } else {
+ PrintError(js, "Unrecognized subcommand '%s'", sub_command);
+ return true;
turnidge 2014/02/27 18:29:13 Add a heartbeat test. I don't care if it is simpl
Cutch 2014/02/27 21:50:33 Done.
+ }
+ }
+ if (js->num_arguments() != 1) {
+ PrintError(js, "Command too long");
+ return true;
+ }
isolate->class_table()->AllocationProfilePrintToJSONStream(js);
return true;
}
« runtime/vm/class_table.h ('K') | « runtime/vm/json_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698