| Index: src/heap/heap.h
|
| diff --git a/src/heap/heap.h b/src/heap/heap.h
|
| index 9f82525cebccebf80aa17f642486eb538c08d99e..1800e9bd9878982e63b92d04885e62d6ab0d9092 100644
|
| --- a/src/heap/heap.h
|
| +++ b/src/heap/heap.h
|
| @@ -2563,65 +2563,6 @@ class WeakObjectRetainer {
|
| virtual Object* RetainAs(Object* object) = 0;
|
| };
|
|
|
| -
|
| -#ifdef DEBUG
|
| -// Helper class for tracing paths to a search target Object from all roots.
|
| -// The TracePathFrom() method can be used to trace paths from a specific
|
| -// object to the search target object.
|
| -class PathTracer : public ObjectVisitor {
|
| - public:
|
| - enum WhatToFind {
|
| - FIND_ALL, // Will find all matches.
|
| - FIND_FIRST // Will stop the search after first match.
|
| - };
|
| -
|
| - // Tags 0, 1, and 3 are used. Use 2 for marking visited HeapObject.
|
| - static const int kMarkTag = 2;
|
| -
|
| - // For the WhatToFind arg, if FIND_FIRST is specified, tracing will stop
|
| - // after the first match. If FIND_ALL is specified, then tracing will be
|
| - // done for all matches.
|
| - PathTracer(Object* search_target, WhatToFind what_to_find,
|
| - VisitMode visit_mode)
|
| - : search_target_(search_target),
|
| - found_target_(false),
|
| - found_target_in_trace_(false),
|
| - what_to_find_(what_to_find),
|
| - visit_mode_(visit_mode),
|
| - object_stack_(20),
|
| - no_allocation() {}
|
| -
|
| - void VisitPointers(Object** start, Object** end) override;
|
| -
|
| - void Reset();
|
| - void TracePathFrom(Object** root);
|
| -
|
| - bool found() const { return found_target_; }
|
| -
|
| - static Object* const kAnyGlobalObject;
|
| -
|
| - protected:
|
| - class MarkVisitor;
|
| - class UnmarkVisitor;
|
| -
|
| - void MarkRecursively(Object** p, MarkVisitor* mark_visitor);
|
| - void UnmarkRecursively(Object** p, UnmarkVisitor* unmark_visitor);
|
| - virtual void ProcessResults();
|
| -
|
| - Object* search_target_;
|
| - bool found_target_;
|
| - bool found_target_in_trace_;
|
| - WhatToFind what_to_find_;
|
| - VisitMode visit_mode_;
|
| - List<Object*> object_stack_;
|
| -
|
| - DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
|
| -
|
| - private:
|
| - DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
|
| -};
|
| -#endif // DEBUG
|
| -
|
| // -----------------------------------------------------------------------------
|
| // Allows observation of allocations.
|
| class AllocationObserver {
|
|
|