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

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

Issue 2657283004: Modified service to include current native zone memory consumption information in the VM object. Ad… (Closed)
Patch Set: Created 3 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 unified diff | Download patch
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 3772 matching lines...) Expand 10 before | Expand all | Expand 10 after
3783 jsobj.AddProperty("type", (ref ? "@VM" : "VM")); 3783 jsobj.AddProperty("type", (ref ? "@VM" : "VM"));
3784 jsobj.AddProperty("name", GetVMName()); 3784 jsobj.AddProperty("name", GetVMName());
3785 if (ref) { 3785 if (ref) {
3786 return; 3786 return;
3787 } 3787 }
3788 jsobj.AddProperty("architectureBits", static_cast<intptr_t>(kBitsPerWord)); 3788 jsobj.AddProperty("architectureBits", static_cast<intptr_t>(kBitsPerWord));
3789 jsobj.AddProperty("targetCPU", CPU::Id()); 3789 jsobj.AddProperty("targetCPU", CPU::Id());
3790 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware()); 3790 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware());
3791 jsobj.AddProperty("version", Version::String()); 3791 jsobj.AddProperty("version", Version::String());
3792 jsobj.AddProperty("_profilerMode", FLAG_profile_vm ? "VM" : "Dart"); 3792 jsobj.AddProperty("_profilerMode", FLAG_profile_vm ? "VM" : "Dart");
3793 jsobj.AddProperty("_nativeZoneMemoryUsage",
3794 ApiNativeScope::current_memory_usage());
3793 jsobj.AddProperty64("pid", OS::ProcessId()); 3795 jsobj.AddProperty64("pid", OS::ProcessId());
3794 jsobj.AddProperty64("_maxRSS", OS::MaxRSS()); 3796 jsobj.AddProperty64("_maxRSS", OS::MaxRSS());
3795 jsobj.AddPropertyTimeMillis( 3797 jsobj.AddPropertyTimeMillis(
3796 "startTime", OS::GetCurrentTimeMillis() - Dart::UptimeMillis()); 3798 "startTime", OS::GetCurrentTimeMillis() - Dart::UptimeMillis());
3797 // Construct the isolate list. 3799 // Construct the isolate list.
3798 { 3800 {
3799 JSONArray jsarr(&jsobj, "isolates"); 3801 JSONArray jsarr(&jsobj, "isolates");
3800 ServiceIsolateVisitor visitor(&jsarr); 3802 ServiceIsolateVisitor visitor(&jsarr);
3801 Isolate::VisitIsolates(&visitor); 3803 Isolate::VisitIsolates(&visitor);
3802 } 3804 }
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
4122 if (strcmp(method_name, method.name) == 0) { 4124 if (strcmp(method_name, method.name) == 0) {
4123 return &method; 4125 return &method;
4124 } 4126 }
4125 } 4127 }
4126 return NULL; 4128 return NULL;
4127 } 4129 }
4128 4130
4129 #endif // !PRODUCT 4131 #endif // !PRODUCT
4130 4132
4131 } // namespace dart 4133 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698