Implement TracePathToObjectFrom helper for debugging.

R=verwaest@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10823054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d078747a
......@@ -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) {
......
......@@ -1285,6 +1285,7 @@ class Heap {
return disallow_allocation_failure_;
}
void TracePathToObjectFrom(Object* target, Object* root);
void TracePathToObject(Object* target);
void TracePathToGlobal();
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment