Commit 8f42a3d8 authored by ulan's avatar ulan Committed by Commit bot

[heap] Remove remaining parts of PathTracer.

This should have been removed with 9e187e.

BUG=

Review-Url: https://codereview.chromium.org/2719013002
Cr-Commit-Position: refs/heads/master@{#43444}
parent eb5f06de
......@@ -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 {
......
......@@ -1457,14 +1457,7 @@ Isolate* HeapObject::GetIsolate() const {
Map* HeapObject::map() const {
#ifdef DEBUG
// Clear mark potentially added by PathTracer.
uintptr_t raw_value =
map_word().ToRawValue() & ~static_cast<uintptr_t>(PathTracer::kMarkTag);
return MapWord::FromRawValue(raw_value).ToMap();
#else
return map_word().ToMap();
#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