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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 // provided array with pairs of (object, offset from parent in words), | 74 // provided array with pairs of (object, offset from parent in words), |
75 // starting with 'obj' itself, as far as there is room. Returns the number | 75 // starting with 'obj' itself, as far as there is room. Returns the number |
76 // of objects on the full path. A null input array behaves like a zero-length | 76 // of objects on the full path. A null input array behaves like a zero-length |
77 // input array. The 'offset' of a root is -1. | 77 // input array. The 'offset' of a root is -1. |
78 // | 78 // |
79 // To break the trivial path, the handle 'obj' is temporarily cleared during | 79 // To break the trivial path, the handle 'obj' is temporarily cleared during |
80 // the search, but restored before returning. If no path is found (i.e., the | 80 // the search, but restored before returning. If no path is found (i.e., the |
81 // provided handle was the only way to reach the object), zero is returned. | 81 // provided handle was the only way to reach the object), zero is returned. |
82 intptr_t RetainingPath(Object* obj, const Array& path); | 82 intptr_t RetainingPath(Object* obj, const Array& path); |
83 | 83 |
84 // Find the objects that reference 'obj'. Populates the provided array with | |
85 // pairs of (object pointing to 'obj', offset of pointer in words), as far as | |
86 // there is room. Returns the number of objects found. | |
87 // | |
88 // An object for which this function answers no inbound references might still | |
89 // be live due to references from the stack or embedder handles. | |
90 intptr_t InboundReferences(Object* obj, const Array& path); | |
koda
2014/08/21 18:21:20
Rename 'path'.
| |
91 | |
84 private: | 92 private: |
85 DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph); | 93 DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph); |
86 }; | 94 }; |
87 | 95 |
88 } // namespace dart | 96 } // namespace dart |
89 | 97 |
90 #endif // VM_OBJECT_GRAPH_H_ | 98 #endif // VM_OBJECT_GRAPH_H_ |
OLD | NEW |