| 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 VM_OBJECT_GRAPH_H_ | 5 #ifndef VM_OBJECT_GRAPH_H_ |
| 6 #define VM_OBJECT_GRAPH_H_ | 6 #define VM_OBJECT_GRAPH_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // Find the objects that reference 'obj'. Populates the provided array with | 87 // Find the objects that reference 'obj'. Populates the provided array with |
| 88 // pairs of (object pointing to 'obj', offset of pointer in words), as far as | 88 // pairs of (object pointing to 'obj', offset of pointer in words), as far as |
| 89 // there is room. Returns the number of objects found. | 89 // there is room. Returns the number of objects found. |
| 90 // | 90 // |
| 91 // An object for which this function answers no inbound references might still | 91 // An object for which this function answers no inbound references might still |
| 92 // be live due to references from the stack or embedder handles. | 92 // be live due to references from the stack or embedder handles. |
| 93 intptr_t InboundReferences(Object* obj, const Array& references); | 93 intptr_t InboundReferences(Object* obj, const Array& references); |
| 94 | 94 |
| 95 // Write the isolate's object graph to 'stream'. Smis and nulls are omitted. | 95 // Write the isolate's object graph to 'stream'. Smis and nulls are omitted. |
| 96 // Returns the number of nodes in the stream, including the root. | 96 // Returns the number of nodes in the stream, including the root. |
| 97 // If collect_garabage is false, the graph will include weakly-reachable |
| 98 // objects. |
| 97 // TODO(koda): Document format; support streaming/chunking. | 99 // TODO(koda): Document format; support streaming/chunking. |
| 98 intptr_t Serialize(WriteStream* stream); | 100 intptr_t Serialize(WriteStream* stream, bool collect_garbage); |
| 99 | 101 |
| 100 private: | 102 private: |
| 101 DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph); | 103 DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph); |
| 102 }; | 104 }; |
| 103 | 105 |
| 104 } // namespace dart | 106 } // namespace dart |
| 105 | 107 |
| 106 #endif // VM_OBJECT_GRAPH_H_ | 108 #endif // VM_OBJECT_GRAPH_H_ |
| OLD | NEW |