Commit 634c58a4 authored by machenbach's avatar machenbach Committed by Commit bot

Revert of Pass GC flags to incremental marker and start incremental marking...

Revert of Pass GC flags to incremental marker and start incremental marking with (patchset #3 id:40001 of https://codereview.chromium.org/1156463002/)

Reason for revert:
[Sheriff] Speculative revert because chromebook is really misbehaving:
http://build.chromium.org/p/client.v8/builders/V8%20Arm/builds/2109

I also triggered a retry with the failing build to be sure. If the revert doesn't help or the bot had a scary hiccup, this can reland.

Original issue's description:
> Pass GC flags to incremental marker and start incremental marking with
> reduce memory footprint in idle notification.
>
> BUG=
>
> Committed: https://crrev.com/4656308147b12405037678b1ab192fb4f2437bbc
> Cr-Commit-Position: refs/heads/master@{#28567}

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

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

Cr-Commit-Position: refs/heads/master@{#28568}
parent 46563081
......@@ -957,7 +957,7 @@ bool Heap::CollectGarbage(GarbageCollector collector, const char* gc_reason,
if (!mark_compact_collector()->abort_incremental_marking() &&
incremental_marking()->IsStopped() &&
incremental_marking()->ShouldActivateEvenWithoutIdleNotification()) {
incremental_marking()->Start(kNoGCFlags);
incremental_marking()->Start();
}
return next_gc_likely_to_collect_more;
......@@ -4654,8 +4654,8 @@ bool Heap::PerformIdleTimeAction(GCIdleTimeAction action,
break;
case DO_INCREMENTAL_MARKING: {
if (incremental_marking()->IsStopped()) {
incremental_marking()->Start(
action.reduce_memory ? kReduceMemoryFootprintMask : kNoGCFlags);
// TODO(ulan): take reduce_memory into account.
incremental_marking()->Start();
}
double remaining_idle_time_in_ms = 0.0;
do {
......
......@@ -467,7 +467,7 @@ static void PatchIncrementalMarkingRecordWriteStubs(
}
void IncrementalMarking::Start(int mark_compact_flags) {
void IncrementalMarking::Start() {
if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] Start\n");
}
......@@ -482,9 +482,7 @@ void IncrementalMarking::Start(int mark_compact_flags) {
was_activated_ = true;
if (!heap_->mark_compact_collector()->sweeping_in_progress()) {
heap_->mark_compact_collector()->SetFlags(mark_compact_flags);
StartMarking();
heap_->mark_compact_collector()->SetFlags(Heap::kNoGCFlags);
} else {
if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] Start sweeping.\n");
......@@ -833,7 +831,7 @@ void IncrementalMarking::Epilogue() {
void IncrementalMarking::OldSpaceStep(intptr_t allocated) {
if (IsStopped() && ShouldActivateEvenWithoutIdleNotification()) {
Start(Heap::kNoGCFlags);
Start();
} else {
Step(allocated * kFastMarking / kInitialMarkingSpeed, GC_VIA_STACK_GUARD);
}
......
......@@ -67,7 +67,7 @@ class IncrementalMarking {
bool WasActivated();
void Start(int mark_compact_flags);
void Start();
void Stop();
......
......@@ -561,7 +561,7 @@ static inline void SimulateIncrementalMarking(i::Heap* heap) {
}
CHECK(marking->IsMarking() || marking->IsStopped());
if (marking->IsStopped()) {
marking->Start(i::Heap::kNoGCFlags);
marking->Start();
}
CHECK(marking->IsMarking());
while (!marking->IsComplete()) {
......
......@@ -2129,7 +2129,7 @@ TEST(InstanceOfStubWriteBarrier) {
IncrementalMarking* marking = CcTest::heap()->incremental_marking();
marking->Abort();
marking->Start(Heap::kNoGCFlags);
marking->Start();
Handle<JSFunction> f =
v8::Utils::OpenHandle(
......@@ -2255,7 +2255,7 @@ TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) {
IncrementalMarking* marking = CcTest::heap()->incremental_marking();
marking->Abort();
marking->Start(Heap::kNoGCFlags);
marking->Start();
// The following calls will increment CcTest::heap()->global_ic_age().
CcTest::isolate()->ContextDisposedNotification();
SimulateIncrementalMarking(CcTest::heap());
......@@ -2313,7 +2313,7 @@ TEST(IdleNotificationFinishMarking) {
SimulateFullSpace(CcTest::heap()->old_space());
IncrementalMarking* marking = CcTest::heap()->incremental_marking();
marking->Abort();
marking->Start(Heap::kNoGCFlags);
marking->Start();
CHECK_EQ(CcTest::heap()->gc_count(), 0);
......@@ -4123,7 +4123,7 @@ TEST(IncrementalMarkingStepMakesBigProgressWithLargeObjects) {
"};"
"f(10 * 1024 * 1024);");
IncrementalMarking* marking = CcTest::heap()->incremental_marking();
if (marking->IsStopped()) marking->Start(Heap::kNoGCFlags);
if (marking->IsStopped()) marking->Start();
// This big step should be sufficient to mark the whole array.
marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
DCHECK(marking->IsComplete() ||
......@@ -4851,7 +4851,7 @@ TEST(WeakCellsWithIncrementalMarking) {
Handle<WeakCell> weak_cell = factory->NewWeakCell(value);
CHECK(weak_cell->value()->IsFixedArray());
IncrementalMarking* marking = heap->incremental_marking();
if (marking->IsStopped()) marking->Start(Heap::kNoGCFlags);
if (marking->IsStopped()) marking->Start();
marking->Step(128, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
heap->CollectGarbage(NEW_SPACE);
CHECK(weak_cell->value()->IsFixedArray());
......@@ -5119,7 +5119,7 @@ TEST(Regress388880) {
// that would cause crash.
IncrementalMarking* marking = CcTest::heap()->incremental_marking();
marking->Abort();
marking->Start(Heap::kNoGCFlags);
marking->Start();
CHECK(marking->IsMarking());
// Now everything is set up for crashing in JSObject::MigrateFastToFast()
......@@ -5145,7 +5145,7 @@ TEST(Regress3631) {
"}"
"weak_map");
if (marking->IsStopped()) {
marking->Start(Heap::kNoGCFlags);
marking->Start();
}
// Incrementally mark the backing store.
Handle<JSObject> obj =
......
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