Chromium Code Reviews| Index: runtime/observatory/lib/src/service/object.dart |
| diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart |
| index e0f6e055920eee8fa6b9a594f19a7a0e95bfa2ca..1f5c95f785aecabce40400c3725ae6fcdfd80f44 100644 |
| --- a/runtime/observatory/lib/src/service/object.dart |
| +++ b/runtime/observatory/lib/src/service/object.dart |
| @@ -1521,12 +1521,21 @@ class Isolate extends ServiceObjectOwner implements M.Isolate { |
| } |
| } |
| - Stream fetchHeapSnapshot(collectGarbage) { |
| + static String _rootsToString(M.HeapSnapshotRoots roots) { |
|
Cutch
2016/11/28 18:11:12
I think this works too:
roots.toString().split('.
rmacnak
2016/11/28 22:57:56
The names don't match. The service enum naming con
|
| + switch (roots) { |
| + case M.HeapSnapshotRoots.user: return "User"; |
| + case M.HeapSnapshotRoots.vm: return "VM"; |
| + } |
| + return null; |
| + } |
| + |
| + Stream fetchHeapSnapshot(M.HeapSnapshotRoots roots, bool collectGarbage) { |
| if (_snapshotFetch == null || _snapshotFetch.isClosed) { |
| _snapshotFetch = new StreamController.broadcast(); |
| // isolate.vm.streamListen('_Graph'); |
| - isolate.invokeRpcNoUpgrade( |
| - '_requestHeapSnapshot', {'collectGarbage': collectGarbage}); |
| + isolate.invokeRpcNoUpgrade('_requestHeapSnapshot', |
| + {'roots': _rootsToString(roots), |
| + 'collectGarbage': collectGarbage}); |
| } |
| return _snapshotFetch.stream; |
| } |