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

Unified Diff: runtime/vm/service.cc

Issue 136303012: Updates refactoring of CPU feature detection (Closed) Base URL: http://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
« no previous file with comments | « runtime/vm/proccpuinfo.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
===================================================================
--- runtime/vm/service.cc (revision 32974)
+++ runtime/vm/service.cc (working copy)
@@ -1048,6 +1048,15 @@
}
+static bool HandleCpu(Isolate* isolate, JSONStream* js) {
+ JSONObject jsobj(js);
+ jsobj.AddProperty("type", "CPU");
+ jsobj.AddProperty("targetCPU", CPU::Id());
+ jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware());
+ return true;
+}
+
+
static bool HandleCode(Isolate* isolate, JSONStream* js) {
REQUIRE_COLLECTION_ID("code");
uintptr_t pc;
@@ -1089,6 +1098,7 @@
{ "classes", HandleClasses },
{ "code", HandleCode },
{ "coverage", HandleCoverage },
+ { "cpu", HandleCpu },
{ "debug", HandleDebug },
{ "libraries", HandleLibraries },
{ "objecthistogram", HandleObjectHistogram},
« no previous file with comments | « runtime/vm/proccpuinfo.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698