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

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

Issue 1535513002: Fix get_cpu_profile_timeline_rpc_test. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « runtime/observatory/tests/service/get_cpu_profile_timeline_rpc_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 "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 10
(...skipping 3224 matching lines...) Expand 10 before | Expand all | Expand 10 after
3235 jsobj.AddProperty("type", (ref ? "@VM" : "VM")); 3235 jsobj.AddProperty("type", (ref ? "@VM" : "VM"));
3236 jsobj.AddProperty("name", GetVMName()); 3236 jsobj.AddProperty("name", GetVMName());
3237 if (ref) { 3237 if (ref) {
3238 return; 3238 return;
3239 } 3239 }
3240 Isolate* vm_isolate = Dart::vm_isolate(); 3240 Isolate* vm_isolate = Dart::vm_isolate();
3241 jsobj.AddProperty("architectureBits", static_cast<intptr_t>(kBitsPerWord)); 3241 jsobj.AddProperty("architectureBits", static_cast<intptr_t>(kBitsPerWord));
3242 jsobj.AddProperty("targetCPU", CPU::Id()); 3242 jsobj.AddProperty("targetCPU", CPU::Id());
3243 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware()); 3243 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware());
3244 jsobj.AddProperty("version", Version::String()); 3244 jsobj.AddProperty("version", Version::String());
3245 jsobj.AddProperty("pid", OS::ProcessId()); 3245 jsobj.AddProperty64("pid", OS::ProcessId());
3246 int64_t start_time_millis = (vm_isolate->start_time() / 3246 int64_t start_time_millis = (vm_isolate->start_time() /
3247 kMicrosecondsPerMillisecond); 3247 kMicrosecondsPerMillisecond);
3248 jsobj.AddPropertyTimeMillis("startTime", start_time_millis); 3248 jsobj.AddPropertyTimeMillis("startTime", start_time_millis);
3249 // Construct the isolate list. 3249 // Construct the isolate list.
3250 { 3250 {
3251 JSONArray jsarr(&jsobj, "isolates"); 3251 JSONArray jsarr(&jsobj, "isolates");
3252 ServiceIsolateVisitor visitor(&jsarr); 3252 ServiceIsolateVisitor visitor(&jsarr);
3253 Isolate::VisitIsolates(&visitor); 3253 Isolate::VisitIsolates(&visitor);
3254 } 3254 }
3255 } 3255 }
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
3575 const ServiceMethodDescriptor& method = service_methods_[i]; 3575 const ServiceMethodDescriptor& method = service_methods_[i];
3576 if (strcmp(method_name, method.name) == 0) { 3576 if (strcmp(method_name, method.name) == 0) {
3577 return &method; 3577 return &method;
3578 } 3578 }
3579 } 3579 }
3580 return NULL; 3580 return NULL;
3581 } 3581 }
3582 3582
3583 3583
3584 } // namespace dart 3584 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/get_cpu_profile_timeline_rpc_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698