Revision: 12222
Author:   [email protected]
Date:     Mon Jul 30 03:32:54 2012
Log:      Implement TracePathToObjectFrom helper for debugging.

[email protected]

Review URL: https://chromiumcodereview.appspot.com/10823054
http://code.google.com/p/v8/source/detail?r=12222

Modified:
 /branches/bleeding_edge/src/heap.cc
 /branches/bleeding_edge/src/heap.h

=======================================
--- /branches/bleeding_edge/src/heap.cc Thu Jul 26 07:55:22 2012
+++ /branches/bleeding_edge/src/heap.cc Mon Jul 30 03:32:54 2012
@@ -6770,6 +6770,15 @@


 #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) {
=======================================
--- /branches/bleeding_edge/src/heap.h  Thu Jul 26 02:18:09 2012
+++ /branches/bleeding_edge/src/heap.h  Mon Jul 30 03:32:54 2012
@@ -1285,6 +1285,7 @@
     return disallow_allocation_failure_;
   }

+  void TracePathToObjectFrom(Object* target, Object* root);
   void TracePathToObject(Object* target);
   void TracePathToGlobal();
 #endif

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to