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

Unified Diff: runtime/vm/object_graph.h

Issue 350403005: Include parent field/list index in retaining path. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/vmservice/client/tests/ui/retainingPath.dart ('k') | runtime/vm/object_graph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_graph.h
===================================================================
--- runtime/vm/object_graph.h (revision 37949)
+++ runtime/vm/object_graph.h (working copy)
@@ -27,6 +27,8 @@
RawObject* Get() const;
// Returns false if there is no parent.
bool MoveToParent();
+ // Offset into parent for the pointer to current object. -1 if no parent.
+ intptr_t OffsetFromParentInWords() const;
private:
StackIterator(const Stack* stack, intptr_t index)
: stack_(stack), index_(index) { }
@@ -69,9 +71,10 @@
intptr_t SizeRetainedByClass(intptr_t class_id);
// Finds some retaining path from the isolate roots to 'obj'. Populates the
- // provided array, starting 'obj' itself, up to the smaller of the length of
- // the array and the length of the path. Returns the length of the path. A
- // null input array behaves like a zero-length input array.
+ // provided array with pairs of (object, offset from parent in words),
+ // starting with 'obj' itself, as far as there is room. Returns the number
+ // of objects on the full path. A null input array behaves like a zero-length
+ // input array. The 'offset' of a root is -1.
//
// To break the trivial path, the handle 'obj' is temporarily cleared during
// the search, but restored before returning. If no path is found (i.e., the
« no previous file with comments | « runtime/bin/vmservice/client/tests/ui/retainingPath.dart ('k') | runtime/vm/object_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698