Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 8e64f9e39cc5d02ee46e4b4ed77423c360594754..4d277db01dd1d032a34824f1f30a15306385e7b0 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -6770,6 +6770,15 @@ void PathTracer::ProcessResults() { |
#ifdef DEBUG |
+// Triggers a depth-first traversal of reachable objects from one |
+// given root object and finds a path to a specific heap object and |
+// prints it. |
+void Heap::TracePathToObjectFrom(Object* target, Object* root) { |
+ PathTracer tracer(target, PathTracer::FIND_ALL, VISIT_ALL); |
+ tracer.VisitPointer(&root); |
+} |
+ |
+ |
// Triggers a depth-first traversal of reachable objects from roots |
// and finds a path to a specific heap object and prints it. |
void Heap::TracePathToObject(Object* target) { |