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

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

Issue 773303003: observatory: populate 'architecture' in VM, and add numerical vmId in Class. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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/bin/vmservice/observatory/test/vm_test.dart ('k') | no next file » | 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 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 2489
2490 private: 2490 private:
2491 JSONArray* jsarr_; 2491 JSONArray* jsarr_;
2492 }; 2492 };
2493 2493
2494 2494
2495 static bool HandleVM(JSONStream* js) { 2495 static bool HandleVM(JSONStream* js) {
2496 JSONObject jsobj(js); 2496 JSONObject jsobj(js);
2497 jsobj.AddProperty("type", "VM"); 2497 jsobj.AddProperty("type", "VM");
2498 jsobj.AddProperty("id", "vm"); 2498 jsobj.AddProperty("id", "vm");
2499 jsobj.AddProperty("architectureBits", static_cast<intptr_t>(kBitsPerWord));
2499 jsobj.AddProperty("targetCPU", CPU::Id()); 2500 jsobj.AddProperty("targetCPU", CPU::Id());
2500 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware()); 2501 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware());
2501 jsobj.AddPropertyF("date", "%" Pd64 "", OS::GetCurrentTimeMillis()); 2502 jsobj.AddPropertyF("date", "%" Pd64 "", OS::GetCurrentTimeMillis());
2502 jsobj.AddProperty("version", Version::String()); 2503 jsobj.AddProperty("version", Version::String());
2503 // Send pid as a string because it allows us to avoid any issues with 2504 // Send pid as a string because it allows us to avoid any issues with
2504 // pids > 53-bits (when consumed by JavaScript). 2505 // pids > 53-bits (when consumed by JavaScript).
2505 // TODO(johnmccutchan): Codify how integers are sent across the service. 2506 // TODO(johnmccutchan): Codify how integers are sent across the service.
2506 jsobj.AddPropertyF("pid", "%" Pd "", OS::ProcessId()); 2507 jsobj.AddPropertyF("pid", "%" Pd "", OS::ProcessId());
2507 jsobj.AddProperty("assertsEnabled", FLAG_enable_asserts); 2508 jsobj.AddProperty("assertsEnabled", FLAG_enable_asserts);
2508 jsobj.AddProperty("typeChecksEnabled", FLAG_enable_type_checks); 2509 jsobj.AddProperty("typeChecksEnabled", FLAG_enable_type_checks);
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
2745 while (current != NULL) { 2746 while (current != NULL) {
2746 if (strcmp(name, current->name()) == 0) { 2747 if (strcmp(name, current->name()) == 0) {
2747 return current; 2748 return current;
2748 } 2749 }
2749 current = current->next(); 2750 current = current->next();
2750 } 2751 }
2751 return NULL; 2752 return NULL;
2752 } 2753 }
2753 2754
2754 } // namespace dart 2755 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/observatory/test/vm_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698