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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/service/object.dart

Issue 345543003: Send allocation stats with each class and show in class view. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 /// A [ServiceObject] is an object known to the VM service and is tied 7 /// A [ServiceObject] is an object known to the VM service and is tied
8 /// to an owning [Isolate]. 8 /// to an owning [Isolate].
9 abstract class ServiceObject extends Observable { 9 abstract class ServiceObject extends Observable {
10 /// The owner of this [ServiceObject]. This can be an [Isolate], a 10 /// The owner of this [ServiceObject]. This can be an [Isolate], a
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 @observable bool isAbstract; 1037 @observable bool isAbstract;
1038 @observable bool isConst; 1038 @observable bool isConst;
1039 @observable bool isFinalized; 1039 @observable bool isFinalized;
1040 @observable bool isPatch; 1040 @observable bool isPatch;
1041 @observable bool isImplemented; 1041 @observable bool isImplemented;
1042 1042
1043 @observable int tokenPos; 1043 @observable int tokenPos;
1044 1044
1045 @observable ServiceMap error; 1045 @observable ServiceMap error;
1046 1046
1047 final Allocations newSpace = new Allocations(); 1047 @reflectable final Allocations newSpace = new Allocations();
Cutch 2014/06/20 18:10:49 @reflectable should no longer be needed with polym
koda 2014/06/20 18:37:04 Done.
1048 final Allocations oldSpace = new Allocations(); 1048 @reflectable final Allocations oldSpace = new Allocations();
1049 1049
1050 bool get hasNoAllocations => newSpace.empty && oldSpace.empty; 1050 bool get hasNoAllocations => newSpace.empty && oldSpace.empty;
1051 1051
1052 @reflectable final children = new ObservableList<Class>(); 1052 @reflectable final children = new ObservableList<Class>();
1053 @reflectable final subClasses = new ObservableList<Class>(); 1053 @reflectable final subClasses = new ObservableList<Class>();
1054 @reflectable final fields = new ObservableList<ServiceMap>(); 1054 @reflectable final fields = new ObservableList<ServiceMap>();
1055 @reflectable final functions = new ObservableList<ServiceMap>(); 1055 @reflectable final functions = new ObservableList<ServiceMap>();
1056 @reflectable final interfaces = new ObservableList<Class>(); 1056 @reflectable final interfaces = new ObservableList<Class>();
1057 1057
1058 bool get canCache => true; 1058 bool get canCache => true;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 fields.addAll(map['fields']); 1102 fields.addAll(map['fields']);
1103 1103
1104 functions.clear(); 1104 functions.clear();
1105 functions.addAll(map['functions']); 1105 functions.addAll(map['functions']);
1106 1106
1107 superClass = map['super']; 1107 superClass = map['super'];
1108 if (superClass != null) { 1108 if (superClass != null) {
1109 superClass._addToChildren(this); 1109 superClass._addToChildren(this);
1110 } 1110 }
1111 error = map['error']; 1111 error = map['error'];
1112
1113 var allocation_stats = map['allocation_stats'];
Cutch 2014/06/20 18:10:49 New service fields should use dartCamelCase.
koda 2014/06/20 18:37:04 Done.
1114 if (allocation_stats != null) {
1115 newSpace.update(allocation_stats['new']);
1116 oldSpace.update(allocation_stats['old']);
1117 }
1112 } 1118 }
1113 1119
1114 void _addToChildren(Class cls) { 1120 void _addToChildren(Class cls) {
1115 if (children.contains(cls)) { 1121 if (children.contains(cls)) {
1116 return; 1122 return;
1117 } 1123 }
1118 children.add(cls); 1124 children.add(cls);
1119 } 1125 }
1120 } 1126 }
1121 1127
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 var v = list[i]; 1806 var v = list[i];
1801 if ((v is ObservableMap) && _isServiceMap(v)) { 1807 if ((v is ObservableMap) && _isServiceMap(v)) {
1802 list[i] = owner.getFromMap(v); 1808 list[i] = owner.getFromMap(v);
1803 } else if (v is ObservableList) { 1809 } else if (v is ObservableList) {
1804 _upgradeObservableList(v, owner); 1810 _upgradeObservableList(v, owner);
1805 } else if (v is ObservableMap) { 1811 } else if (v is ObservableMap) {
1806 _upgradeObservableMap(v, owner); 1812 _upgradeObservableMap(v, owner);
1807 } 1813 }
1808 } 1814 }
1809 } 1815 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698