Commit 371ae8c7 authored by ishell's avatar ishell Committed by Commit bot

Revert of Allow compaction when incremental marking is on. (patchset #1 id:1...

Revert of Allow compaction when incremental marking is on. (patchset #1 id:1 of https://codereview.chromium.org/1014263002/)

Reason for revert:
It seems to cause crbug/469146.

Original issue's description:
> Allow compaction when incremental marking is on.
>
> BUG=chromium:450824
> LOG=NO
>
> Committed: https://crrev.com/92f96e4e9a527fcb085b68f81ee14b26acdd4719
> Cr-Commit-Position: refs/heads/master@{#27267}

TBR=hpayer@chromium.org,ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:450824

Review URL: https://codereview.chromium.org/1026813002

Cr-Commit-Position: refs/heads/master@{#27345}
parent bef80fcf
...@@ -468,7 +468,7 @@ static void PatchIncrementalMarkingRecordWriteStubs( ...@@ -468,7 +468,7 @@ static void PatchIncrementalMarkingRecordWriteStubs(
} }
void IncrementalMarking::Start() { void IncrementalMarking::Start(CompactionFlag flag) {
if (FLAG_trace_incremental_marking) { if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] Start\n"); PrintF("[IncrementalMarking] Start\n");
} }
...@@ -483,7 +483,7 @@ void IncrementalMarking::Start() { ...@@ -483,7 +483,7 @@ void IncrementalMarking::Start() {
was_activated_ = true; was_activated_ = true;
if (!heap_->mark_compact_collector()->sweeping_in_progress()) { if (!heap_->mark_compact_collector()->sweeping_in_progress()) {
StartMarking(); StartMarking(flag);
} else { } else {
if (FLAG_trace_incremental_marking) { if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] Start sweeping.\n"); PrintF("[IncrementalMarking] Start sweeping.\n");
...@@ -495,12 +495,12 @@ void IncrementalMarking::Start() { ...@@ -495,12 +495,12 @@ void IncrementalMarking::Start() {
} }
void IncrementalMarking::StartMarking() { void IncrementalMarking::StartMarking(CompactionFlag flag) {
if (FLAG_trace_incremental_marking) { if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] Start marking\n"); PrintF("[IncrementalMarking] Start marking\n");
} }
is_compacting_ = !FLAG_never_compact && is_compacting_ = !FLAG_never_compact && (flag == ALLOW_COMPACTION) &&
heap_->mark_compact_collector()->StartCompaction( heap_->mark_compact_collector()->StartCompaction(
MarkCompactCollector::INCREMENTAL_COMPACTION); MarkCompactCollector::INCREMENTAL_COMPACTION);
...@@ -834,7 +834,9 @@ void IncrementalMarking::Epilogue() { ...@@ -834,7 +834,9 @@ void IncrementalMarking::Epilogue() {
void IncrementalMarking::OldSpaceStep(intptr_t allocated) { void IncrementalMarking::OldSpaceStep(intptr_t allocated) {
if (IsStopped() && ShouldActivate()) { if (IsStopped() && ShouldActivate()) {
Start(); // TODO(hpayer): Let's play safe for now, but compaction should be
// in principle possible.
Start(PREVENT_COMPACTION);
} else { } else {
Step(allocated * kFastMarking / kInitialMarkingSpeed, GC_VIA_STACK_GUARD); Step(allocated * kFastMarking / kInitialMarkingSpeed, GC_VIA_STACK_GUARD);
} }
...@@ -963,7 +965,7 @@ intptr_t IncrementalMarking::Step(intptr_t allocated_bytes, ...@@ -963,7 +965,7 @@ intptr_t IncrementalMarking::Step(intptr_t allocated_bytes,
} }
if (!heap_->mark_compact_collector()->sweeping_in_progress()) { if (!heap_->mark_compact_collector()->sweeping_in_progress()) {
bytes_scanned_ = 0; bytes_scanned_ = 0;
StartMarking(); StartMarking(PREVENT_COMPACTION);
} }
} else if (state_ == MARKING) { } else if (state_ == MARKING) {
bytes_processed = ProcessMarkingDeque(bytes_to_process); bytes_processed = ProcessMarkingDeque(bytes_to_process);
......
...@@ -67,7 +67,9 @@ class IncrementalMarking { ...@@ -67,7 +67,9 @@ class IncrementalMarking {
bool WasActivated(); bool WasActivated();
void Start(); enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION };
void Start(CompactionFlag flag = ALLOW_COMPACTION);
void Stop(); void Stop();
...@@ -206,7 +208,7 @@ class IncrementalMarking { ...@@ -206,7 +208,7 @@ class IncrementalMarking {
void ResetStepCounters(); void ResetStepCounters();
void StartMarking(); void StartMarking(CompactionFlag flag);
void ActivateIncrementalWriteBarrier(PagedSpace* space); void ActivateIncrementalWriteBarrier(PagedSpace* space);
static void ActivateIncrementalWriteBarrier(NewSpace* space); static void ActivateIncrementalWriteBarrier(NewSpace* space);
......
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