| OLD | NEW |
| 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 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 @reflectable int endAddress = 0; | 1198 @reflectable int endAddress = 0; |
| 1199 @reflectable final callers = new List<CodeCallCount>(); | 1199 @reflectable final callers = new List<CodeCallCount>(); |
| 1200 @reflectable final callees = new List<CodeCallCount>(); | 1200 @reflectable final callees = new List<CodeCallCount>(); |
| 1201 @reflectable final instructions = new ObservableList<CodeInstruction>(); | 1201 @reflectable final instructions = new ObservableList<CodeInstruction>(); |
| 1202 @reflectable final addressTicks = new ObservableMap<int, CodeTick>(); | 1202 @reflectable final addressTicks = new ObservableMap<int, CodeTick>(); |
| 1203 @observable String formattedInclusiveTicks = ''; | 1203 @observable String formattedInclusiveTicks = ''; |
| 1204 @observable String formattedExclusiveTicks = ''; | 1204 @observable String formattedExclusiveTicks = ''; |
| 1205 @observable ServiceMap objectPool; | 1205 @observable ServiceMap objectPool; |
| 1206 @observable ServiceMap function; | 1206 @observable ServiceMap function; |
| 1207 @observable Script script; | 1207 @observable Script script; |
| 1208 @observable bool isOptimized = false; |
| 1208 String name; | 1209 String name; |
| 1209 String vmName; | 1210 String vmName; |
| 1210 | 1211 |
| 1211 bool get canCache => true; | 1212 bool get canCache => true; |
| 1212 bool get immutable => true; | 1213 bool get immutable => true; |
| 1213 | 1214 |
| 1214 Code._empty(ServiceObjectOwner owner) : super._empty(owner); | 1215 Code._empty(ServiceObjectOwner owner) : super._empty(owner); |
| 1215 | 1216 |
| 1216 // Reset all data associated with a profile. | 1217 // Reset all data associated with a profile. |
| 1217 void resetProfileData() { | 1218 void resetProfileData() { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 '${formatPercent(inclusiveTicks, totalSamplesInProfile)} ' | 1315 '${formatPercent(inclusiveTicks, totalSamplesInProfile)} ' |
| 1315 '($inclusiveTicks)'; | 1316 '($inclusiveTicks)'; |
| 1316 formattedExclusiveTicks = | 1317 formattedExclusiveTicks = |
| 1317 '${formatPercent(exclusiveTicks, totalSamplesInProfile)} ' | 1318 '${formatPercent(exclusiveTicks, totalSamplesInProfile)} ' |
| 1318 '($exclusiveTicks)'; | 1319 '($exclusiveTicks)'; |
| 1319 } | 1320 } |
| 1320 | 1321 |
| 1321 void _update(ObservableMap m, bool mapIsRef) { | 1322 void _update(ObservableMap m, bool mapIsRef) { |
| 1322 name = m['user_name']; | 1323 name = m['user_name']; |
| 1323 vmName = m['name']; | 1324 vmName = m['name']; |
| 1325 isOptimized = m['isOptimized'] != null ? m['isOptimized'] : false; |
| 1324 kind = CodeKind.fromString(m['kind']); | 1326 kind = CodeKind.fromString(m['kind']); |
| 1325 startAddress = int.parse(m['start'], radix:16); | 1327 startAddress = int.parse(m['start'], radix:16); |
| 1326 endAddress = int.parse(m['end'], radix:16); | 1328 endAddress = int.parse(m['end'], radix:16); |
| 1327 function = isolate.getFromMap(m['function']); | 1329 function = isolate.getFromMap(m['function']); |
| 1328 objectPool = isolate.getFromMap(m['object_pool']); | 1330 objectPool = isolate.getFromMap(m['object_pool']); |
| 1329 var disassembly = m['disassembly']; | 1331 var disassembly = m['disassembly']; |
| 1330 if (disassembly != null) { | 1332 if (disassembly != null) { |
| 1331 _processDisassembly(disassembly); | 1333 _processDisassembly(disassembly); |
| 1332 } | 1334 } |
| 1333 var descriptors = m['descriptors']; | 1335 var descriptors = m['descriptors']; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1474 var v = list[i]; | 1476 var v = list[i]; |
| 1475 if ((v is ObservableMap) && _isServiceMap(v)) { | 1477 if ((v is ObservableMap) && _isServiceMap(v)) { |
| 1476 list[i] = owner.getFromMap(v); | 1478 list[i] = owner.getFromMap(v); |
| 1477 } else if (v is ObservableList) { | 1479 } else if (v is ObservableList) { |
| 1478 _upgradeObservableList(v, owner); | 1480 _upgradeObservableList(v, owner); |
| 1479 } else if (v is ObservableMap) { | 1481 } else if (v is ObservableMap) { |
| 1480 _upgradeObservableMap(v, owner); | 1482 _upgradeObservableMap(v, owner); |
| 1481 } | 1483 } |
| 1482 } | 1484 } |
| 1483 } | 1485 } |
| OLD | NEW |