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

Side by Side Diff: runtime/observatory/lib/src/service/object.dart

Issue 2250793004: Observatory: Report peak process memory usage. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Windows include Created 4 years, 4 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) 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 // The list of live isolates, ordered by isolate start time. 623 // The list of live isolates, ordered by isolate start time.
624 final ObservableList<Isolate> isolates = new ObservableList<Isolate>(); 624 final ObservableList<Isolate> isolates = new ObservableList<Isolate>();
625 625
626 @observable String version = 'unknown'; 626 @observable String version = 'unknown';
627 @observable String hostCPU; 627 @observable String hostCPU;
628 @observable String targetCPU; 628 @observable String targetCPU;
629 @observable int architectureBits; 629 @observable int architectureBits;
630 @observable bool assertsEnabled = false; 630 @observable bool assertsEnabled = false;
631 @observable bool typeChecksEnabled = false; 631 @observable bool typeChecksEnabled = false;
632 @observable int pid = 0; 632 @observable int pid = 0;
633 @observable int maxRSS = 0;
633 @observable bool profileVM = false; 634 @observable bool profileVM = false;
634 @observable DateTime startTime; 635 @observable DateTime startTime;
635 @observable DateTime refreshTime; 636 @observable DateTime refreshTime;
636 @observable Duration get upTime { 637 @observable Duration get upTime {
637 if (startTime == null) { 638 if (startTime == null) {
638 return null; 639 return null;
639 } 640 }
640 return (new DateTime.now().difference(startTime)); 641 return (new DateTime.now().difference(startTime));
641 } 642 }
642 643
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 _loaded = true; 901 _loaded = true;
901 version = map['version']; 902 version = map['version'];
902 hostCPU = map['hostCPU']; 903 hostCPU = map['hostCPU'];
903 targetCPU = map['targetCPU']; 904 targetCPU = map['targetCPU'];
904 architectureBits = map['architectureBits']; 905 architectureBits = map['architectureBits'];
905 int startTimeMillis = map['startTime']; 906 int startTimeMillis = map['startTime'];
906 startTime = new DateTime.fromMillisecondsSinceEpoch(startTimeMillis); 907 startTime = new DateTime.fromMillisecondsSinceEpoch(startTimeMillis);
907 refreshTime = new DateTime.now(); 908 refreshTime = new DateTime.now();
908 notifyPropertyChange(#upTime, 0, 1); 909 notifyPropertyChange(#upTime, 0, 1);
909 pid = map['pid']; 910 pid = map['pid'];
911 maxRSS = map['_maxRSS'];
910 profileVM = map['_profilerMode'] == 'VM'; 912 profileVM = map['_profilerMode'] == 'VM';
911 assertsEnabled = map['_assertsEnabled']; 913 assertsEnabled = map['_assertsEnabled'];
912 typeChecksEnabled = map['_typeChecksEnabled']; 914 typeChecksEnabled = map['_typeChecksEnabled'];
913 _removeDeadIsolates(map['isolates']); 915 _removeDeadIsolates(map['isolates']);
914 } 916 }
915 917
916 // Reload all isolates. 918 // Reload all isolates.
917 Future reloadIsolates() { 919 Future reloadIsolates() {
918 var reloads = []; 920 var reloads = [];
919 for (var isolate in isolates) { 921 for (var isolate in isolates) {
(...skipping 3174 matching lines...) Expand 10 before | Expand all | Expand 10 after
4094 var v = list[i]; 4096 var v = list[i];
4095 if ((v is ObservableMap) && _isServiceMap(v)) { 4097 if ((v is ObservableMap) && _isServiceMap(v)) {
4096 list[i] = owner.getFromMap(v); 4098 list[i] = owner.getFromMap(v);
4097 } else if (v is ObservableList) { 4099 } else if (v is ObservableList) {
4098 _upgradeObservableList(v, owner); 4100 _upgradeObservableList(v, owner);
4099 } else if (v is ObservableMap) { 4101 } else if (v is ObservableMap) {
4100 _upgradeObservableMap(v, owner); 4102 _upgradeObservableMap(v, owner);
4101 } 4103 }
4102 } 4104 }
4103 } 4105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698