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 "vm/cpu.h" | 7 #include "vm/cpu.h" |
8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
9 #include "vm/debugger.h" | 9 #include "vm/debugger.h" |
10 #include "vm/heap_histogram.h" | 10 #include "vm/heap_histogram.h" |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 } | 586 } |
587 } else { | 587 } else { |
588 PrintError(js, "Unrecognized subcommand '%s'", js->GetArgument(1)); | 588 PrintError(js, "Unrecognized subcommand '%s'", js->GetArgument(1)); |
589 } | 589 } |
590 } | 590 } |
591 | 591 |
592 | 592 |
593 static void HandleCpu(Isolate* isolate, JSONStream* js) { | 593 static void HandleCpu(Isolate* isolate, JSONStream* js) { |
594 JSONObject jsobj(js); | 594 JSONObject jsobj(js); |
595 jsobj.AddProperty("type", "CPU"); | 595 jsobj.AddProperty("type", "CPU"); |
596 jsobj.AddProperty("architecture", CPU::Id()); | 596 jsobj.AddProperty("targetCPU", CPU::Id()); |
| 597 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware()); |
597 } | 598 } |
598 | 599 |
599 | 600 |
600 static void HandleCode(Isolate* isolate, JSONStream* js) { | 601 static void HandleCode(Isolate* isolate, JSONStream* js) { |
601 REQUIRE_COLLECTION_ID("code"); | 602 REQUIRE_COLLECTION_ID("code"); |
602 uintptr_t pc; | 603 uintptr_t pc; |
603 if (!GetUnsignedIntegerId(js->GetArgument(1), &pc, 16)) { | 604 if (!GetUnsignedIntegerId(js->GetArgument(1), &pc, 16)) { |
604 PrintError(js, "Must specify code address: code/c0deadd0."); | 605 PrintError(js, "Must specify code address: code/c0deadd0."); |
605 return; | 606 return; |
606 } | 607 } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 for (intptr_t i = 0; i < num_message_handlers; i++) { | 650 for (intptr_t i = 0; i < num_message_handlers; i++) { |
650 const ServiceMessageHandlerEntry& entry = __message_handlers[i]; | 651 const ServiceMessageHandlerEntry& entry = __message_handlers[i]; |
651 if (!strcmp(command, entry.command)) { | 652 if (!strcmp(command, entry.command)) { |
652 return entry.handler; | 653 return entry.handler; |
653 } | 654 } |
654 } | 655 } |
655 return HandleFallthrough; | 656 return HandleFallthrough; |
656 } | 657 } |
657 | 658 |
658 } // namespace dart | 659 } // namespace dart |
OLD | NEW |