Commit 8ddaafb1 authored by Hannes Payer's avatar Hannes Payer Committed by Commit Bot

Revert "[heap] Clear from space after garbage collection."

This reverts commit 494068c1.

Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=840282

Original change's description:
> [heap] Clear from space after garbage collection.
>
> Bug: chromium:829771
> Change-Id: I9e71e6cbba347dd6951e5415332e5178df9b5122
> Reviewed-on: https://chromium-review.googlesource.com/1041685
> Commit-Queue: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52957}

TBR=hpayer@chromium.org,mlippautz@chromium.org

Bug: chromium:829771
Change-Id: I3c36baaf849a7d5dbf48db2ae2178e15b3b886f8
Reviewed-on: https://chromium-review.googlesource.com/1049888
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53079}
parent 4d4a3294
......@@ -920,7 +920,10 @@ void Heap::DeoptMarkedAllocationSites() {
void Heap::GarbageCollectionEpilogue() {
TRACE_GC(tracer(), GCTracer::Scope::HEAP_EPILOGUE);
// In release mode, we only zap the from space under heap verification.
if (Heap::ShouldZapGarbage()) {
ZapFromSpace();
}
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
......@@ -3837,13 +3840,12 @@ void Heap::VerifyCountersBeforeConcurrentSweeping() {
void Heap::ZapFromSpace() {
if (!new_space_->IsFromSpaceCommitted()) return;
for (Page* page :
PageRange(new_space_->FromSpaceStart(), new_space_->FromSpaceEnd())) {
memory_allocator()->ZapBlock(page->area_start(), page->area_size(),
Heap::ShouldZapGarbage()
? kFromSpaceZapValue
: kClearedFreeMemoryValue);
for (Address cursor = page->area_start(), limit = page->area_end();
cursor < limit; cursor += kPointerSize) {
Memory::Address_at(cursor) = static_cast<Address>(kFromSpaceZapValue);
}
}
}
......
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