| Index: test/cctest/heap/test-heap.cc
|
| diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc
|
| index 10ff89c278e198baee5c9e35bc8e8298bb8066d6..b1af005fd8a0d6e2f305492ec58ab83c74c8d15c 100644
|
| --- a/test/cctest/heap/test-heap.cc
|
| +++ b/test/cctest/heap/test-heap.cc
|
| @@ -2658,6 +2658,14 @@ TEST(InstanceOfStubWriteBarrier) {
|
| CcTest::heap()->CollectGarbage(OLD_SPACE);
|
| }
|
|
|
| +namespace {
|
| +
|
| +int GetProfilerTicks(SharedFunctionInfo* shared) {
|
| + return FLAG_ignition ? shared->profiler_ticks()
|
| + : shared->code()->profiler_ticks();
|
| +}
|
| +
|
| +} // namespace
|
|
|
| TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) {
|
| i::FLAG_stress_compaction = false;
|
| @@ -2688,16 +2696,18 @@ TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) {
|
| CcTest::global()->Get(ctx, v8_str("f")).ToLocalChecked())));
|
| CHECK(f->IsOptimized());
|
|
|
| - IncrementalMarking* marking = CcTest::heap()->incremental_marking();
|
| - marking->Stop();
|
| + // Make sure incremental marking it not running.
|
| + CcTest::heap()->incremental_marking()->Stop();
|
| +
|
| CcTest::heap()->StartIncrementalMarking();
|
| // The following calls will increment CcTest::heap()->global_ic_age().
|
| CcTest::isolate()->ContextDisposedNotification();
|
| 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());
|
| + CHECK_EQ(0, GetProfilerTicks(f->shared()));
|
| }
|
|
|
|
|
| @@ -2728,9 +2738,9 @@ TEST(ResetSharedFunctionInfoCountersDuringMarkSweep) {
|
| i::Handle<JSFunction> f = i::Handle<JSFunction>::cast(
|
| v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast(
|
| CcTest::global()->Get(ctx, v8_str("f")).ToLocalChecked())));
|
| -
|
| CHECK(f->IsOptimized());
|
|
|
| + // Make sure incremental marking it not running.
|
| CcTest::heap()->incremental_marking()->Stop();
|
|
|
| // The following two calls will increment CcTest::heap()->global_ic_age().
|
| @@ -2739,7 +2749,7 @@ TEST(ResetSharedFunctionInfoCountersDuringMarkSweep) {
|
|
|
| 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());
|
| + CHECK_EQ(0, GetProfilerTicks(f->shared()));
|
| }
|
|
|
|
|
|
|