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

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

Issue 2990643002: Calculates retaining paths through user fields and ignores VM objects (Closed)
Patch Set: Adds new test that expects a simple path for const and top level functions Created 3 years, 4 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
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 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // trigger GC in any way. 56 // trigger GC in any way.
57 virtual Direction VisitObject(StackIterator* it) = 0; 57 virtual Direction VisitObject(StackIterator* it) = 0;
58 }; 58 };
59 59
60 explicit ObjectGraph(Thread* thread); 60 explicit ObjectGraph(Thread* thread);
61 ~ObjectGraph(); 61 ~ObjectGraph();
62 62
63 // Visits all strongly reachable objects in the isolate's heap, in a 63 // Visits all strongly reachable objects in the isolate's heap, in a
64 // pre-order, depth first traversal. 64 // pre-order, depth first traversal.
65 void IterateObjects(Visitor* visitor); 65 void IterateObjects(Visitor* visitor);
66 void IterateUserObjects(Visitor* visitor);
66 67
67 // Like 'IterateObjects', but restricted to objects reachable from 'root' 68 // Like 'IterateObjects', but restricted to objects reachable from 'root'
68 // (including 'root' itself). 69 // (including 'root' itself).
69 void IterateObjectsFrom(const Object& root, Visitor* visitor); 70 void IterateObjectsFrom(const Object& root, Visitor* visitor);
70 void IterateObjectsFrom(intptr_t class_id, Visitor* visitor); 71 void IterateObjectsFrom(intptr_t class_id, Visitor* visitor);
71 72
72 // The number of bytes retained by 'obj'. 73 // The number of bytes retained by 'obj'.
73 intptr_t SizeRetainedByInstance(const Object& obj); 74 intptr_t SizeRetainedByInstance(const Object& obj);
74 intptr_t SizeReachableByInstance(const Object& obj); 75 intptr_t SizeReachableByInstance(const Object& obj);
75 76
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 SnapshotRoots roots, 108 SnapshotRoots roots,
108 bool collect_garbage); 109 bool collect_garbage);
109 110
110 private: 111 private:
111 DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph); 112 DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph);
112 }; 113 };
113 114
114 } // namespace dart 115 } // namespace dart
115 116
116 #endif // RUNTIME_VM_OBJECT_GRAPH_H_ 117 #endif // RUNTIME_VM_OBJECT_GRAPH_H_
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/get_user_level_retaining_path_rpc_test.dart ('k') | runtime/vm/object_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698