| Index: src/heap/mark-compact.h
|
| diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
|
| index 50c23dd810d7d17552f5dcdd9392711a640b5065..4e3352baba0b2b027a6d8fb05d3cfc5e5f395d1c 100644
|
| --- a/src/heap/mark-compact.h
|
| +++ b/src/heap/mark-compact.h
|
| @@ -135,6 +135,7 @@ class Marking {
|
| Heap* heap_;
|
| };
|
|
|
| +
|
| // ----------------------------------------------------------------------------
|
| // Marking deque for tracing live objects.
|
| class MarkingDeque {
|
| @@ -167,6 +168,9 @@ class MarkingDeque {
|
| // otherwise mark the object as overflowed and wait for a rescan of the
|
| // heap.
|
| INLINE(void PushBlack(HeapObject* object)) {
|
| +#ifdef TRACE_RETAINING_PATH
|
| + AddRetainedObject(object);
|
| +#endif
|
| DCHECK(object->IsHeapObject());
|
| // TODO(jochen): Remove again before we branch for 4.2.
|
| CHECK(object->IsHeapObject() && object->map()->IsMap());
|
| @@ -181,6 +185,9 @@ class MarkingDeque {
|
| }
|
|
|
| INLINE(void PushGrey(HeapObject* object)) {
|
| +#ifdef TRACE_RETAINING_PATH
|
| + AddRetainedObject(object);
|
| +#endif
|
| DCHECK(object->IsHeapObject());
|
| // TODO(jochen): Remove again before we branch for 4.2.
|
| CHECK(object->IsHeapObject() && object->map()->IsMap());
|
| @@ -217,6 +224,10 @@ class MarkingDeque {
|
| void set_top(int top) { top_ = top; }
|
|
|
| private:
|
| +#ifdef TRACE_RETAINING_PATH
|
| + static void AddRetainedObject(HeapObject* obj);
|
| +#endif
|
| +
|
| HeapObject** array_;
|
| // array_[(top - 1) & mask_] is the top element in the deque. The Deque is
|
| // empty when top_ == bottom_. It is full when top_ + 1 == bottom
|
|
|