From 72b00cab5c3078f7ac09c8f12d047bc541cf1b65 Mon Sep 17 00:00:00 2001 From: mlippautz Date: Tue, 12 Apr 2016 05:25:53 -0700 Subject: [PATCH] [heap] Add tracing for age_marks upon evacuation R=ulan@chromium.org BUG=chromium:581412 LOG=N Review URL: https://codereview.chromium.org/1882033002 Cr-Commit-Position: refs/heads/master@{#35414} --- src/heap/mark-compact.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc index bffbc5c33e..65c09a00e8 100644 --- a/src/heap/mark-compact.cc +++ b/src/heap/mark-compact.cc @@ -3026,10 +3026,17 @@ bool MarkCompactCollector::Evacuator::EvacuateSinglePage( success = collector_->VisitLiveObjects(p, visitor, kClearMarkbits); } if (FLAG_trace_evacuation) { + const char age_mark_tag = + !p->InNewSpace() + ? 'x' + : !p->IsFlagSet(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK) + ? '>' + : !p->ContainsLimit(heap()->new_space()->age_mark()) ? '<' + : '#'; PrintIsolate(heap()->isolate(), - "evacuation[%p]: page=%p new_space=%d executable=%d " - "live_bytes=%d time=%f\n", - this, p, p->InNewSpace(), + "evacuation[%p]: page=%p new_space=%d age_mark_tag=%c " + "executable=%d live_bytes=%d time=%f\n", + this, p, p->InNewSpace(), age_mark_tag, p->IsFlagSet(MemoryChunk::IS_EXECUTABLE), saved_live_bytes, evacuation_time); }