OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 part of service; | 5 part of service; |
6 | 6 |
7 // Some value smaller than the object ring, so requesting a large array | 7 // Some value smaller than the object ring, so requesting a large array |
8 // doesn't result in an expired ref because the elements lapped it in the | 8 // doesn't result in an expired ref because the elements lapped it in the |
9 // object ring. | 9 // object ring. |
10 const int kDefaultFieldLimit = 100; | 10 const int kDefaultFieldLimit = 100; |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 final Map<String, Isolate> _isolateCache = <String, Isolate>{}; | 662 final Map<String, Isolate> _isolateCache = <String, Isolate>{}; |
663 | 663 |
664 // The list of live isolates, ordered by isolate start time. | 664 // The list of live isolates, ordered by isolate start time. |
665 final List<Isolate> isolates = <Isolate>[]; | 665 final List<Isolate> isolates = <Isolate>[]; |
666 | 666 |
667 final List<Service> services = <Service>[]; | 667 final List<Service> services = <Service>[]; |
668 | 668 |
669 String version = 'unknown'; | 669 String version = 'unknown'; |
670 String hostCPU; | 670 String hostCPU; |
671 String targetCPU; | 671 String targetCPU; |
672 String embedder; | |
673 int architectureBits; | 672 int architectureBits; |
674 bool assertsEnabled = false; | 673 bool assertsEnabled = false; |
675 bool typeChecksEnabled = false; | 674 bool typeChecksEnabled = false; |
676 int nativeZoneMemoryUsage = 0; | 675 int nativeZoneMemoryUsage = 0; |
677 int pid = 0; | 676 int pid = 0; |
678 int heapAllocatedMemoryUsage = 0; | 677 int heapAllocatedMemoryUsage = 0; |
679 int heapAllocationCount = 0; | 678 int heapAllocationCount = 0; |
680 int maxRSS; | 679 int maxRSS = 0; |
681 int currentRSS; | |
682 bool profileVM = false; | 680 bool profileVM = false; |
683 DateTime startTime; | 681 DateTime startTime; |
684 DateTime refreshTime; | 682 DateTime refreshTime; |
685 Duration get upTime { | 683 Duration get upTime { |
686 if (startTime == null) { | 684 if (startTime == null) { |
687 return null; | 685 return null; |
688 } | 686 } |
689 return (new DateTime.now().difference(startTime)); | 687 return (new DateTime.now().difference(startTime)); |
690 } | 688 } |
691 | 689 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 hostCPU = map['hostCPU']; | 971 hostCPU = map['hostCPU']; |
974 targetCPU = map['targetCPU']; | 972 targetCPU = map['targetCPU']; |
975 architectureBits = map['architectureBits']; | 973 architectureBits = map['architectureBits']; |
976 int startTimeMillis = map['startTime']; | 974 int startTimeMillis = map['startTime']; |
977 startTime = new DateTime.fromMillisecondsSinceEpoch(startTimeMillis); | 975 startTime = new DateTime.fromMillisecondsSinceEpoch(startTimeMillis); |
978 refreshTime = new DateTime.now(); | 976 refreshTime = new DateTime.now(); |
979 if (map['_nativeZoneMemoryUsage'] != null) { | 977 if (map['_nativeZoneMemoryUsage'] != null) { |
980 nativeZoneMemoryUsage = map['_nativeZoneMemoryUsage']; | 978 nativeZoneMemoryUsage = map['_nativeZoneMemoryUsage']; |
981 } | 979 } |
982 pid = map['pid']; | 980 pid = map['pid']; |
983 heapAllocatedMemoryUsage = map['_heapAllocatedMemoryUsage']; | 981 if (map['_heapAllocatedMemoryUsage'] != null) { |
984 heapAllocationCount = map['_heapAllocationCount']; | 982 heapAllocatedMemoryUsage = map['_heapAllocatedMemoryUsage']; |
985 embedder = map['_embedder']; | 983 } |
| 984 if (map['_heapAllocationCount'] != null) { |
| 985 heapAllocationCount = map['_heapAllocationCount']; |
| 986 } |
986 maxRSS = map['_maxRSS']; | 987 maxRSS = map['_maxRSS']; |
987 currentRSS = map['_currentRSS']; | |
988 profileVM = map['_profilerMode'] == 'VM'; | 988 profileVM = map['_profilerMode'] == 'VM'; |
989 assertsEnabled = map['_assertsEnabled']; | 989 assertsEnabled = map['_assertsEnabled']; |
990 typeChecksEnabled = map['_typeChecksEnabled']; | 990 typeChecksEnabled = map['_typeChecksEnabled']; |
991 _removeDeadIsolates(map['isolates']); | 991 _removeDeadIsolates(map['isolates']); |
992 } | 992 } |
993 | 993 |
994 // Reload all isolates. | 994 // Reload all isolates. |
995 Future reloadIsolates() { | 995 Future reloadIsolates() { |
996 var reloads = []; | 996 var reloads = []; |
997 for (var isolate in isolates) { | 997 for (var isolate in isolates) { |
(...skipping 3704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4702 final String alias; | 4702 final String alias; |
4703 final String method; | 4703 final String method; |
4704 final String service; | 4704 final String service; |
4705 | 4705 |
4706 Service(this.alias, this.method, this.service) { | 4706 Service(this.alias, this.method, this.service) { |
4707 assert(this.alias != null); | 4707 assert(this.alias != null); |
4708 assert(this.method != null); | 4708 assert(this.method != null); |
4709 assert(this.service != null); | 4709 assert(this.service != null); |
4710 } | 4710 } |
4711 } | 4711 } |
OLD | NEW |