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

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

Issue 1851293005: Improve CPU Profile View (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 615
616 // The list of live isolates, ordered by isolate start time. 616 // The list of live isolates, ordered by isolate start time.
617 final ObservableList<Isolate> isolates = new ObservableList<Isolate>(); 617 final ObservableList<Isolate> isolates = new ObservableList<Isolate>();
618 618
619 @observable String version = 'unknown'; 619 @observable String version = 'unknown';
620 @observable String targetCPU; 620 @observable String targetCPU;
621 @observable int architectureBits; 621 @observable int architectureBits;
622 @observable bool assertsEnabled = false; 622 @observable bool assertsEnabled = false;
623 @observable bool typeChecksEnabled = false; 623 @observable bool typeChecksEnabled = false;
624 @observable int pid = 0; 624 @observable int pid = 0;
625 @observable bool profileVM = false;
625 @observable DateTime startTime; 626 @observable DateTime startTime;
626 @observable DateTime refreshTime; 627 @observable DateTime refreshTime;
627 @observable Duration get upTime { 628 @observable Duration get upTime {
628 if (startTime == null) { 629 if (startTime == null) {
629 return null; 630 return null;
630 } 631 }
631 return (new DateTime.now().difference(startTime)); 632 return (new DateTime.now().difference(startTime));
632 } 633 }
633 634
634 VM() : super._empty(null) { 635 VM() : super._empty(null) {
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 891
891 _loaded = true; 892 _loaded = true;
892 version = map['version']; 893 version = map['version'];
893 targetCPU = map['targetCPU']; 894 targetCPU = map['targetCPU'];
894 architectureBits = map['architectureBits']; 895 architectureBits = map['architectureBits'];
895 int startTimeMillis = map['startTime']; 896 int startTimeMillis = map['startTime'];
896 startTime = new DateTime.fromMillisecondsSinceEpoch(startTimeMillis); 897 startTime = new DateTime.fromMillisecondsSinceEpoch(startTimeMillis);
897 refreshTime = new DateTime.now(); 898 refreshTime = new DateTime.now();
898 notifyPropertyChange(#upTime, 0, 1); 899 notifyPropertyChange(#upTime, 0, 1);
899 pid = map['pid']; 900 pid = map['pid'];
901 profileVM = map['_profilerMode'] == 'VM';
900 assertsEnabled = map['_assertsEnabled']; 902 assertsEnabled = map['_assertsEnabled'];
901 typeChecksEnabled = map['_typeChecksEnabled']; 903 typeChecksEnabled = map['_typeChecksEnabled'];
902 _removeDeadIsolates(map['isolates']); 904 _removeDeadIsolates(map['isolates']);
903 } 905 }
904 906
905 // Reload all isolates. 907 // Reload all isolates.
906 Future reloadIsolates() { 908 Future reloadIsolates() {
907 var reloads = []; 909 var reloads = [];
908 for (var isolate in isolates) { 910 for (var isolate in isolates) {
909 var reload = isolate.reload().catchError((e) { 911 var reload = isolate.reload().catchError((e) {
(...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after
4043 var v = list[i]; 4045 var v = list[i];
4044 if ((v is ObservableMap) && _isServiceMap(v)) { 4046 if ((v is ObservableMap) && _isServiceMap(v)) {
4045 list[i] = owner.getFromMap(v); 4047 list[i] = owner.getFromMap(v);
4046 } else if (v is ObservableList) { 4048 } else if (v is ObservableList) {
4047 _upgradeObservableList(v, owner); 4049 _upgradeObservableList(v, owner);
4048 } else if (v is ObservableMap) { 4050 } else if (v is ObservableMap) {
4049 _upgradeObservableMap(v, owner); 4051 _upgradeObservableMap(v, owner);
4050 } 4052 }
4051 } 4053 }
4052 } 4054 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698