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

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

Issue 2762323002: Reimplemented zone memory tracking to avoid race conditions that were causing crashes in the previo… (Closed)
Patch Set: Final change Created 3 years, 9 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
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/thread.h » ('j') | 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 3827 matching lines...) Expand 10 before | Expand all | Expand 10 after
3838 jsobj.AddProperty("type", (ref ? "@VM" : "VM")); 3838 jsobj.AddProperty("type", (ref ? "@VM" : "VM"));
3839 jsobj.AddProperty("name", GetVMName()); 3839 jsobj.AddProperty("name", GetVMName());
3840 if (ref) { 3840 if (ref) {
3841 return; 3841 return;
3842 } 3842 }
3843 jsobj.AddProperty("architectureBits", static_cast<intptr_t>(kBitsPerWord)); 3843 jsobj.AddProperty("architectureBits", static_cast<intptr_t>(kBitsPerWord));
3844 jsobj.AddProperty("targetCPU", CPU::Id()); 3844 jsobj.AddProperty("targetCPU", CPU::Id());
3845 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware()); 3845 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware());
3846 jsobj.AddProperty("version", Version::String()); 3846 jsobj.AddProperty("version", Version::String());
3847 jsobj.AddProperty("_profilerMode", FLAG_profile_vm ? "VM" : "Dart"); 3847 jsobj.AddProperty("_profilerMode", FLAG_profile_vm ? "VM" : "Dart");
3848 jsobj.AddProperty("_nativeZoneMemoryUsage", 3848 jsobj.AddProperty64("_nativeZoneMemoryUsage",
3849 ApiNativeScope::current_memory_usage()); 3849 ApiNativeScope::current_memory_usage());
3850 jsobj.AddProperty64("pid", OS::ProcessId()); 3850 jsobj.AddProperty64("pid", OS::ProcessId());
3851 jsobj.AddProperty64("_maxRSS", OS::MaxRSS()); 3851 jsobj.AddProperty64("_maxRSS", OS::MaxRSS());
3852 jsobj.AddPropertyTimeMillis( 3852 jsobj.AddPropertyTimeMillis(
3853 "startTime", OS::GetCurrentTimeMillis() - Dart::UptimeMillis()); 3853 "startTime", OS::GetCurrentTimeMillis() - Dart::UptimeMillis());
3854 MallocHooks::PrintToJSONObject(&jsobj); 3854 MallocHooks::PrintToJSONObject(&jsobj);
3855 // Construct the isolate list. 3855 // Construct the isolate list.
3856 { 3856 {
3857 JSONArray jsarr(&jsobj, "isolates"); 3857 JSONArray jsarr(&jsobj, "isolates");
3858 ServiceIsolateVisitor visitor(&jsarr); 3858 ServiceIsolateVisitor visitor(&jsarr);
3859 Isolate::VisitIsolates(&visitor); 3859 Isolate::VisitIsolates(&visitor);
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
4168 if (strcmp(method_name, method.name) == 0) { 4168 if (strcmp(method_name, method.name) == 0) {
4169 return &method; 4169 return &method;
4170 } 4170 }
4171 } 4171 }
4172 return NULL; 4172 return NULL;
4173 } 4173 }
4174 4174
4175 #endif // !PRODUCT 4175 #endif // !PRODUCT
4176 4176
4177 } // namespace dart 4177 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698