Commit 047977c5 authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Abort black allocation when aborting incremental marking.

BUG=chromium:630386

Review-Url: https://codereview.chromium.org/2337943002
Cr-Commit-Position: refs/heads/master@{#39380}
parent 97b330ad
...@@ -626,6 +626,16 @@ void IncrementalMarking::FinishBlackAllocation() { ...@@ -626,6 +626,16 @@ void IncrementalMarking::FinishBlackAllocation() {
} }
} }
void IncrementalMarking::AbortBlackAllocation() {
for (Page* page : *heap()->old_space()) {
page->ReleaseBlackAreaEndMarkerMap();
}
if (FLAG_trace_incremental_marking) {
heap()->isolate()->PrintWithTimestamp(
"[IncrementalMarking] Black allocation aborted\n");
}
}
void IncrementalMarking::MarkRoots() { void IncrementalMarking::MarkRoots() {
DCHECK(!finalize_marking_completed_); DCHECK(!finalize_marking_completed_);
DCHECK(IsMarking()); DCHECK(IsMarking());
......
...@@ -225,6 +225,8 @@ class IncrementalMarking { ...@@ -225,6 +225,8 @@ class IncrementalMarking {
void StartBlackAllocationForTesting() { StartBlackAllocation(); } void StartBlackAllocationForTesting() { StartBlackAllocation(); }
void AbortBlackAllocation();
private: private:
class Observer : public AllocationObserver { class Observer : public AllocationObserver {
public: public:
......
...@@ -801,6 +801,7 @@ void MarkCompactCollector::Prepare() { ...@@ -801,6 +801,7 @@ void MarkCompactCollector::Prepare() {
// Clear marking bits if incremental marking is aborted. // Clear marking bits if incremental marking is aborted.
if (was_marked_incrementally_ && heap_->ShouldAbortIncrementalMarking()) { if (was_marked_incrementally_ && heap_->ShouldAbortIncrementalMarking()) {
heap()->incremental_marking()->Stop(); heap()->incremental_marking()->Stop();
heap()->incremental_marking()->AbortBlackAllocation();
ClearMarkbits(); ClearMarkbits();
AbortWeakCollections(); AbortWeakCollections();
AbortWeakCells(); AbortWeakCells();
......
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