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

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

Issue 2273203004: Converted Observatory persistent-hangles-page element (Closed)
Patch Set: Fixed finalizer name visualization Created 4 years, 3 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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 1130
1131 class Port implements M.Port { 1131 class Port implements M.Port {
1132 final String name; 1132 final String name;
1133 final HeapObject handler; 1133 final HeapObject handler;
1134 1134
1135 Port(ServiceMap map) 1135 Port(ServiceMap map)
1136 : name = map['name'], 1136 : name = map['name'],
1137 handler = map['handler']; 1137 handler = map['handler'];
1138 } 1138 }
1139 1139
1140 class PersistentHandles implements M.PersistentHandles {
1141 final Iterable<PersistentHandle> elements;
1142 final Iterable<WeakPersistentHandle> weakElements;
1143
1144 PersistentHandles(ServiceMap map)
1145 : this.elements = map['persistentHandles']
1146 .map((rmap) => new PersistentHandle(rmap)),
1147 this.weakElements = map['weakPersistentHandles']
1148 .map((rmap) => new WeakPersistentHandle(rmap));
1149 }
1150
1151 class PersistentHandle implements M.PersistentHandle {
1152 final HeapObject object;
1153
1154 PersistentHandle(ServiceMap map)
1155 : object = map['object'];
1156 }
1157
1158 class WeakPersistentHandle implements M.WeakPersistentHandle {
1159 final int externalSize;
1160 final String peer;
1161 final String callbackSymbolName;
1162 final String callbackAddress;
1163 final HeapObject object;
1164
1165 WeakPersistentHandle(ServiceMap map)
1166 : externalSize = int.parse(map['externalSize']),
1167 peer = map['peer'],
1168 callbackSymbolName = map['callbackSymbolName'],
1169 callbackAddress = map['callbackAddress'],
1170 object = map['object'];
1171 }
1172
1140 class HeapSpace extends Observable implements M.HeapSpace { 1173 class HeapSpace extends Observable implements M.HeapSpace {
1141 @observable int used = 0; 1174 @observable int used = 0;
1142 @observable int capacity = 0; 1175 @observable int capacity = 0;
1143 @observable int external = 0; 1176 @observable int external = 0;
1144 @observable int collections = 0; 1177 @observable int collections = 0;
1145 @observable double totalCollectionTimeInSeconds = 0.0; 1178 @observable double totalCollectionTimeInSeconds = 0.0;
1146 @observable double averageCollectionPeriodInMillis = 0.0; 1179 @observable double averageCollectionPeriodInMillis = 0.0;
1147 1180
1148 Duration get avgCollectionTime { 1181 Duration get avgCollectionTime {
1149 final mcs = totalCollectionTimeInSeconds * Duration.MICROSECONDS_PER_SECOND 1182 final mcs = totalCollectionTimeInSeconds * Duration.MICROSECONDS_PER_SECOND
(...skipping 3145 matching lines...) Expand 10 before | Expand all | Expand 10 after
4295 var v = list[i]; 4328 var v = list[i];
4296 if ((v is ObservableMap) && _isServiceMap(v)) { 4329 if ((v is ObservableMap) && _isServiceMap(v)) {
4297 list[i] = owner.getFromMap(v); 4330 list[i] = owner.getFromMap(v);
4298 } else if (v is ObservableList) { 4331 } else if (v is ObservableList) {
4299 _upgradeObservableList(v, owner); 4332 _upgradeObservableList(v, owner);
4300 } else if (v is ObservableMap) { 4333 } else if (v is ObservableMap) {
4301 _upgradeObservableMap(v, owner); 4334 _upgradeObservableMap(v, owner);
4302 } 4335 }
4303 } 4336 }
4304 } 4337 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698