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

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

Issue 2678313003: Fix for issue 28638 - flakiness on dartkp-dart-precompiled caused by MallocHooks (Closed)
Patch Set: Address self review comments. 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
« no previous file with comments | « runtime/vm/malloc_hooks_unsupported.cc ('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 3784 matching lines...) Expand 10 before | Expand all | Expand 10 after
3795 jsobj.AddProperty("targetCPU", CPU::Id()); 3795 jsobj.AddProperty("targetCPU", CPU::Id());
3796 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware()); 3796 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware());
3797 jsobj.AddProperty("version", Version::String()); 3797 jsobj.AddProperty("version", Version::String());
3798 jsobj.AddProperty("_profilerMode", FLAG_profile_vm ? "VM" : "Dart"); 3798 jsobj.AddProperty("_profilerMode", FLAG_profile_vm ? "VM" : "Dart");
3799 jsobj.AddProperty("_nativeZoneMemoryUsage", 3799 jsobj.AddProperty("_nativeZoneMemoryUsage",
3800 ApiNativeScope::current_memory_usage()); 3800 ApiNativeScope::current_memory_usage());
3801 jsobj.AddProperty64("pid", OS::ProcessId()); 3801 jsobj.AddProperty64("pid", OS::ProcessId());
3802 jsobj.AddProperty64("_maxRSS", OS::MaxRSS()); 3802 jsobj.AddProperty64("_maxRSS", OS::MaxRSS());
3803 jsobj.AddPropertyTimeMillis( 3803 jsobj.AddPropertyTimeMillis(
3804 "startTime", OS::GetCurrentTimeMillis() - Dart::UptimeMillis()); 3804 "startTime", OS::GetCurrentTimeMillis() - Dart::UptimeMillis());
3805 if (MallocHooks::Initialized()) { 3805 MallocHooks::PrintToJSONObject(&jsobj);
3806 jsobj.AddProperty("_heapAllocatedMemoryUsage",
3807 MallocHooks::heap_allocated_memory_in_bytes());
3808 jsobj.AddProperty("_heapAllocationCount", MallocHooks::allocation_count());
3809 }
3810 // Construct the isolate list. 3806 // Construct the isolate list.
3811 { 3807 {
3812 JSONArray jsarr(&jsobj, "isolates"); 3808 JSONArray jsarr(&jsobj, "isolates");
3813 ServiceIsolateVisitor visitor(&jsarr); 3809 ServiceIsolateVisitor visitor(&jsarr);
3814 Isolate::VisitIsolates(&visitor); 3810 Isolate::VisitIsolates(&visitor);
3815 } 3811 }
3816 } 3812 }
3817 3813
3818 3814
3819 static bool GetVM(Thread* thread, JSONStream* js) { 3815 static bool GetVM(Thread* thread, JSONStream* js) {
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
4135 if (strcmp(method_name, method.name) == 0) { 4131 if (strcmp(method_name, method.name) == 0) {
4136 return &method; 4132 return &method;
4137 } 4133 }
4138 } 4134 }
4139 return NULL; 4135 return NULL;
4140 } 4136 }
4141 4137
4142 #endif // !PRODUCT 4138 #endif // !PRODUCT
4143 4139
4144 } // namespace dart 4140 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/malloc_hooks_unsupported.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698