Chromium Code Reviews| 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 // 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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1514 | 1514 |
| 1515 var loadedChunks = _chunksInProgress; | 1515 var loadedChunks = _chunksInProgress; |
| 1516 _chunksInProgress = null; | 1516 _chunksInProgress = null; |
| 1517 | 1517 |
| 1518 if (_snapshotFetch != null) { | 1518 if (_snapshotFetch != null) { |
| 1519 _snapshotFetch.add(new RawHeapSnapshot(loadedChunks, event.nodeCount)); | 1519 _snapshotFetch.add(new RawHeapSnapshot(loadedChunks, event.nodeCount)); |
| 1520 _snapshotFetch.close(); | 1520 _snapshotFetch.close(); |
| 1521 } | 1521 } |
| 1522 } | 1522 } |
| 1523 | 1523 |
| 1524 Stream fetchHeapSnapshot(collectGarbage) { | 1524 Stream fetchHeapSnapshot(String roots, bool collectGarbage) { |
|
Cutch
2016/11/18 20:40:31
HeapSnapshotRoots roots
| |
| 1525 if (_snapshotFetch == null || _snapshotFetch.isClosed) { | 1525 if (_snapshotFetch == null || _snapshotFetch.isClosed) { |
| 1526 _snapshotFetch = new StreamController.broadcast(); | 1526 _snapshotFetch = new StreamController.broadcast(); |
| 1527 // isolate.vm.streamListen('_Graph'); | 1527 // isolate.vm.streamListen('_Graph'); |
| 1528 isolate.invokeRpcNoUpgrade( | 1528 isolate.invokeRpcNoUpgrade('_requestHeapSnapshot', |
| 1529 '_requestHeapSnapshot', {'collectGarbage': collectGarbage}); | 1529 {'roots': roots, |
| 1530 'collectGarbage': collectGarbage}); | |
| 1530 } | 1531 } |
| 1531 return _snapshotFetch.stream; | 1532 return _snapshotFetch.stream; |
| 1532 } | 1533 } |
| 1533 | 1534 |
| 1534 void updateHeapsFromMap(Map map) { | 1535 void updateHeapsFromMap(Map map) { |
| 1535 newSpace.update(map['new']); | 1536 newSpace.update(map['new']); |
| 1536 oldSpace.update(map['old']); | 1537 oldSpace.update(map['old']); |
| 1537 } | 1538 } |
| 1538 | 1539 |
| 1539 void _update(Map map, bool mapIsRef) { | 1540 void _update(Map map, bool mapIsRef) { |
| (...skipping 2857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4397 var v = list[i]; | 4398 var v = list[i]; |
| 4398 if ((v is Map) && _isServiceMap(v)) { | 4399 if ((v is Map) && _isServiceMap(v)) { |
| 4399 list[i] = owner.getFromMap(v); | 4400 list[i] = owner.getFromMap(v); |
| 4400 } else if (v is List) { | 4401 } else if (v is List) { |
| 4401 _upgradeList(v, owner); | 4402 _upgradeList(v, owner); |
| 4402 } else if (v is Map) { | 4403 } else if (v is Map) { |
| 4403 _upgradeMap(v, owner); | 4404 _upgradeMap(v, owner); |
| 4404 } | 4405 } |
| 4405 } | 4406 } |
| 4406 } | 4407 } |
| OLD | NEW |