| Index: runtime/vm/service.cc
|
| diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
|
| index afc31be2c2550e26e05d32107b94cd64f826fb00..95f24d9abd55178a2c26961f7a2ca49045d58fb7 100644
|
| --- a/runtime/vm/service.cc
|
| +++ b/runtime/vm/service.cc
|
| @@ -1086,6 +1086,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;
|
| + }
|
| + }
|
| + if (js->num_arguments() != 1) {
|
| + PrintError(js, "Command too long");
|
| + return true;
|
| + }
|
| isolate->class_table()->AllocationProfilePrintToJSONStream(js);
|
| return true;
|
| }
|
|
|