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

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

Issue 1811713002: Perform a full GC by default when requesting a heap snapshot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 1358
1359 latestSnapshot = new HeapSnapshot(this, loadedChunks, event.nodeCount); 1359 latestSnapshot = new HeapSnapshot(this, loadedChunks, event.nodeCount);
1360 if (_snapshotFetch != null) { 1360 if (_snapshotFetch != null) {
1361 latestSnapshot.graph.process(_snapshotFetch).then((graph) { 1361 latestSnapshot.graph.process(_snapshotFetch).then((graph) {
1362 _snapshotFetch.add(latestSnapshot); 1362 _snapshotFetch.add(latestSnapshot);
1363 _snapshotFetch.close(); 1363 _snapshotFetch.close();
1364 }); 1364 });
1365 } 1365 }
1366 } 1366 }
1367 1367
1368 Stream fetchHeapSnapshot() { 1368 Stream fetchHeapSnapshot(collectGarbage) {
1369 if (_snapshotFetch == null || _snapshotFetch.isClosed) { 1369 if (_snapshotFetch == null || _snapshotFetch.isClosed) {
1370 _snapshotFetch = new StreamController(); 1370 _snapshotFetch = new StreamController();
1371 // isolate.vm.streamListen('_Graph'); 1371 // isolate.vm.streamListen('_Graph');
1372 isolate.invokeRpcNoUpgrade('_requestHeapSnapshot', {}); 1372 isolate.invokeRpcNoUpgrade('_requestHeapSnapshot',
1373 {'collectGarbage': collectGarbage});
1373 } 1374 }
1374 return _snapshotFetch.stream; 1375 return _snapshotFetch.stream;
1375 } 1376 }
1376 1377
1377 void updateHeapsFromMap(ObservableMap map) { 1378 void updateHeapsFromMap(ObservableMap map) {
1378 newSpace.update(map['new']); 1379 newSpace.update(map['new']);
1379 oldSpace.update(map['old']); 1380 oldSpace.update(map['old']);
1380 } 1381 }
1381 1382
1382 void _update(ObservableMap map, bool mapIsRef) { 1383 void _update(ObservableMap map, bool mapIsRef) {
(...skipping 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after
4020 var v = list[i]; 4021 var v = list[i];
4021 if ((v is ObservableMap) && _isServiceMap(v)) { 4022 if ((v is ObservableMap) && _isServiceMap(v)) {
4022 list[i] = owner.getFromMap(v); 4023 list[i] = owner.getFromMap(v);
4023 } else if (v is ObservableList) { 4024 } else if (v is ObservableList) {
4024 _upgradeObservableList(v, owner); 4025 _upgradeObservableList(v, owner);
4025 } else if (v is ObservableMap) { 4026 } else if (v is ObservableMap) {
4026 _upgradeObservableMap(v, owner); 4027 _upgradeObservableMap(v, owner);
4027 } 4028 }
4028 } 4029 }
4029 } 4030 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698