| Index: test/cctest/test-heap.cc
|
| diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
|
| index 7bc1a88bb8aa1a6b917c2f12b448ce2a3f378406..8f9559d19577f779288397b046954dc0feae1bb6 100644
|
| --- a/test/cctest/test-heap.cc
|
| +++ b/test/cctest/test-heap.cc
|
| @@ -2243,28 +2243,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());
|
| @@ -2303,13 +2285,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());
|
|
|