Skip to content

Commit

Permalink
Revert of Pass GC flags to incremental marker and start incremental m…
Browse files Browse the repository at this point in the history
…arking with (patchset v8#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}
  • Loading branch information
mi-ac authored and Commit bot committed May 21, 2015
1 parent 4656308 commit 634c58a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/heap/heap.cc
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 2 additions & 4 deletions src/heap/incremental-marking.cc
Expand Up @@ -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");
}
Expand All @@ -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");
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/heap/incremental-marking.h
Expand Up @@ -67,7 +67,7 @@ class IncrementalMarking {

bool WasActivated();

void Start(int mark_compact_flags);
void Start();

void Stop();

Expand Down
2 changes: 1 addition & 1 deletion test/cctest/cctest.h
Expand Up @@ -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()) {
Expand Down
14 changes: 7 additions & 7 deletions test/cctest/test-heap.cc
Expand Up @@ -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(
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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() ||
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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()
Expand All @@ -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 =
Expand Down

0 comments on commit 634c58a

Please sign in to comment.