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

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

Issue 487973002: Track per-class promotion stats. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/class_table.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 static int LexicalSortName(ServiceObject o1, ServiceObject o2) { 10 static int LexicalSortName(ServiceObject o1, ServiceObject o2) {
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 @observable bool isPatch; 1289 @observable bool isPatch;
1290 @observable bool isImplemented; 1290 @observable bool isImplemented;
1291 1291
1292 @observable int tokenPos; 1292 @observable int tokenPos;
1293 @observable int endTokenPos; 1293 @observable int endTokenPos;
1294 1294
1295 @observable ServiceMap error; 1295 @observable ServiceMap error;
1296 1296
1297 final Allocations newSpace = new Allocations(); 1297 final Allocations newSpace = new Allocations();
1298 final Allocations oldSpace = new Allocations(); 1298 final Allocations oldSpace = new Allocations();
1299 final AllocationCount promotedByLastNewGC = new AllocationCount();
1299 1300
1300 bool get hasNoAllocations => newSpace.empty && oldSpace.empty; 1301 bool get hasNoAllocations => newSpace.empty && oldSpace.empty;
1301 1302
1302 @reflectable final children = new ObservableList<Class>(); 1303 @reflectable final children = new ObservableList<Class>();
1303 @reflectable final subClasses = new ObservableList<Class>(); 1304 @reflectable final subClasses = new ObservableList<Class>();
1304 @reflectable final fields = new ObservableList<ServiceMap>(); 1305 @reflectable final fields = new ObservableList<ServiceMap>();
1305 @reflectable final functions = new ObservableList<ServiceFunction>(); 1306 @reflectable final functions = new ObservableList<ServiceFunction>();
1306 @reflectable final interfaces = new ObservableList<Class>(); 1307 @reflectable final interfaces = new ObservableList<Class>();
1307 1308
1308 bool get canCache => true; 1309 bool get canCache => true;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 superClass = map['super']; 1362 superClass = map['super'];
1362 if (superClass != null) { 1363 if (superClass != null) {
1363 superClass._addToChildren(this); 1364 superClass._addToChildren(this);
1364 } 1365 }
1365 error = map['error']; 1366 error = map['error'];
1366 1367
1367 var allocationStats = map['allocationStats']; 1368 var allocationStats = map['allocationStats'];
1368 if (allocationStats != null) { 1369 if (allocationStats != null) {
1369 newSpace.update(allocationStats['new']); 1370 newSpace.update(allocationStats['new']);
1370 oldSpace.update(allocationStats['old']); 1371 oldSpace.update(allocationStats['old']);
1372 promotedByLastNewGC.instances = allocationStats['promotedInstances'];
1373 promotedByLastNewGC.bytes = allocationStats['promotedBytes'];
1371 } 1374 }
1372 } 1375 }
1373 1376
1374 void _addToChildren(Class cls) { 1377 void _addToChildren(Class cls) {
1375 if (children.contains(cls)) { 1378 if (children.contains(cls)) {
1376 return; 1379 return;
1377 } 1380 }
1378 children.add(cls); 1381 children.add(cls);
1379 } 1382 }
1380 1383
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
2256 var v = list[i]; 2259 var v = list[i];
2257 if ((v is ObservableMap) && _isServiceMap(v)) { 2260 if ((v is ObservableMap) && _isServiceMap(v)) {
2258 list[i] = owner.getFromMap(v); 2261 list[i] = owner.getFromMap(v);
2259 } else if (v is ObservableList) { 2262 } else if (v is ObservableList) {
2260 _upgradeObservableList(v, owner); 2263 _upgradeObservableList(v, owner);
2261 } else if (v is ObservableMap) { 2264 } else if (v is ObservableMap) {
2262 _upgradeObservableMap(v, owner); 2265 _upgradeObservableMap(v, owner);
2263 } 2266 }
2264 } 2267 }
2265 } 2268 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698