| 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 #ifndef RUNTIME_VM_OBJECT_GRAPH_H_ | 5 #ifndef RUNTIME_VM_OBJECT_GRAPH_H_ |
| 6 #define RUNTIME_VM_OBJECT_GRAPH_H_ | 6 #define RUNTIME_VM_OBJECT_GRAPH_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // there is room. Returns the number of objects found. | 93 // there is room. Returns the number of objects found. |
| 94 // | 94 // |
| 95 // An object for which this function answers no inbound references might still | 95 // An object for which this function answers no inbound references might still |
| 96 // be live due to references from the stack or embedder handles. | 96 // be live due to references from the stack or embedder handles. |
| 97 intptr_t InboundReferences(Object* obj, const Array& references); | 97 intptr_t InboundReferences(Object* obj, const Array& references); |
| 98 | 98 |
| 99 enum SnapshotRoots { kVM, kUser }; | 99 enum SnapshotRoots { kVM, kUser }; |
| 100 | 100 |
| 101 // Write the isolate's object graph to 'stream'. Smis and nulls are omitted. | 101 // Write the isolate's object graph to 'stream'. Smis and nulls are omitted. |
| 102 // Returns the number of nodes in the stream, including the root. | 102 // Returns the number of nodes in the stream, including the root. |
| 103 // If collect_garabage is false, the graph will include weakly-reachable | 103 // If collect_garbage is false, the graph will include weakly-reachable |
| 104 // objects. | 104 // objects. |
| 105 // TODO(koda): Document format; support streaming/chunking. | 105 // TODO(koda): Document format; support streaming/chunking. |
| 106 intptr_t Serialize(WriteStream* stream, | 106 intptr_t Serialize(WriteStream* stream, |
| 107 SnapshotRoots roots, | 107 SnapshotRoots roots, |
| 108 bool collect_garbage); | 108 bool collect_garbage); |
| 109 | 109 |
| 110 private: | 110 private: |
| 111 DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph); | 111 DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace dart | 114 } // namespace dart |
| 115 | 115 |
| 116 #endif // RUNTIME_VM_OBJECT_GRAPH_H_ | 116 #endif // RUNTIME_VM_OBJECT_GRAPH_H_ |
| OLD | NEW |