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

Side by Side Diff: runtime/vm/object_graph.h

Issue 286203015: ObjectGraph::RetainingPath (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/object_graph.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Like 'IterateObjects', but restricted to objects reachable from 'root' 61 // Like 'IterateObjects', but restricted to objects reachable from 'root'
62 // (including 'root' itself). 62 // (including 'root' itself).
63 void IterateObjectsFrom(const Object& root, Visitor* visitor); 63 void IterateObjectsFrom(const Object& root, Visitor* visitor);
64 64
65 // The number of bytes retained by 'obj'. 65 // The number of bytes retained by 'obj'.
66 intptr_t SizeRetainedByInstance(const Object& obj); 66 intptr_t SizeRetainedByInstance(const Object& obj);
67 67
68 // The number of bytes retained by the set of all objects of the given class. 68 // The number of bytes retained by the set of all objects of the given class.
69 intptr_t SizeRetainedByClass(intptr_t class_id); 69 intptr_t SizeRetainedByClass(intptr_t class_id);
70 70
71 // Finds some retaining path from the isolate roots to 'obj'. Populates the
72 // provided array, starting with a direct parent of 'obj', up to the smaller
73 // of the length of the array and the length of the path. Returns the length
74 // of the path. A null input array behaves like a zero-length input array.
75 //
76 // To break the trivial path, the handle 'obj' is temporarily cleared during
77 // the search, but restored before returning. If no path is found (i.e., the
78 // provided handle was the only way to reach the object), zero is returned.
79 intptr_t RetainingPath(Object* obj, const Array& path);
80
71 private: 81 private:
72 DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph); 82 DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph);
73 }; 83 };
74 84
75 } // namespace dart 85 } // namespace dart
76 86
77 #endif // VM_OBJECT_GRAPH_H_ 87 #endif // VM_OBJECT_GRAPH_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698