| Index: test/cctest/test-heap.cc
|
| diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
|
| index 906b4fe8a968fb8beaba0db2fb175d08ee6bd39f..5820e361e2e9345e6dc07a7c8a99e489e0f1b9e2 100644
|
| --- a/test/cctest/test-heap.cc
|
| +++ b/test/cctest/test-heap.cc
|
| @@ -2241,28 +2241,10 @@ TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) {
|
| IncrementalMarking* marking = CcTest::heap()->incremental_marking();
|
| marking->Abort();
|
| marking->Start();
|
| -
|
| - // The following two calls will increment CcTest::heap()->global_ic_age().
|
| - const double kLongIdlePauseInSeconds = 1.0;
|
| + // The following calls will increment CcTest::heap()->global_ic_age().
|
| CcTest::isolate()->ContextDisposedNotification();
|
| - CcTest::isolate()->IdleNotificationDeadline(
|
| - (v8::base::TimeTicks::HighResolutionNow().ToInternalValue() /
|
| - static_cast<double>(v8::base::Time::kMicrosecondsPerSecond)) +
|
| - kLongIdlePauseInSeconds);
|
| -
|
| - while (!marking->IsStopped() && !marking->IsComplete()) {
|
| - marking->Step(1 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
|
| - }
|
| - if (!marking->IsStopped() || marking->should_hurry()) {
|
| - // We don't normally finish a GC via Step(), we normally finish by
|
| - // setting the stack guard and then do the final steps in the stack
|
| - // guard interrupt. But here we didn't ask for that, and there is no
|
| - // JS code running to trigger the interrupt, so we explicitly finalize
|
| - // here.
|
| - CcTest::heap()->CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask,
|
| - "Test finalizing incremental mark-sweep");
|
| - }
|
| -
|
| + SimulateIncrementalMarking(CcTest::heap());
|
| + CcTest::heap()->CollectAllGarbage();
|
| CHECK_EQ(CcTest::heap()->global_ic_age(), f->shared()->ic_age());
|
| CHECK_EQ(0, f->shared()->opt_count());
|
| CHECK_EQ(0, f->shared()->code()->profiler_ticks());
|
| @@ -2301,13 +2283,8 @@ TEST(ResetSharedFunctionInfoCountersDuringMarkSweep) {
|
| CcTest::heap()->incremental_marking()->Abort();
|
|
|
| // The following two calls will increment CcTest::heap()->global_ic_age().
|
| - // Since incremental marking is off, IdleNotification will do full GC.
|
| - const double kLongIdlePauseInSeconds = 1.0;
|
| CcTest::isolate()->ContextDisposedNotification();
|
| - CcTest::isolate()->IdleNotificationDeadline(
|
| - (v8::base::TimeTicks::HighResolutionNow().ToInternalValue() /
|
| - static_cast<double>(v8::base::Time::kMicrosecondsPerSecond)) +
|
| - kLongIdlePauseInSeconds);
|
| + CcTest::heap()->CollectAllGarbage();
|
|
|
| CHECK_EQ(CcTest::heap()->global_ic_age(), f->shared()->ic_age());
|
| CHECK_EQ(0, f->shared()->opt_count());
|
|
|