diff options
Diffstat (limited to 'deps/v8/test/unittests/heap/gc-tracer-unittest.cc')
-rw-r--r-- | deps/v8/test/unittests/heap/gc-tracer-unittest.cc | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/deps/v8/test/unittests/heap/gc-tracer-unittest.cc b/deps/v8/test/unittests/heap/gc-tracer-unittest.cc index eefacb33ed..c8ec9ca563 100644 --- a/deps/v8/test/unittests/heap/gc-tracer-unittest.cc +++ b/deps/v8/test/unittests/heap/gc-tracer-unittest.cc @@ -179,10 +179,10 @@ TEST_F(GCTracerTest, RegularScope) { EXPECT_DOUBLE_EQ(0.0, tracer->current_.scopes[GCTracer::Scope::MC_MARK]); // Sample not added because it's not within a started tracer. tracer->AddScopeSample(GCTracer::Scope::MC_MARK, 100); - tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting, - "collector unittest"); + tracer->Start(GarbageCollector::MARK_COMPACTOR, + GarbageCollectionReason::kTesting, "collector unittest"); tracer->AddScopeSample(GCTracer::Scope::MC_MARK, 100); - tracer->Stop(MARK_COMPACTOR); + tracer->Stop(GarbageCollector::MARK_COMPACTOR); EXPECT_DOUBLE_EQ(100.0, tracer->current_.scopes[GCTracer::Scope::MC_MARK]); } @@ -194,12 +194,12 @@ TEST_F(GCTracerTest, IncrementalScope) { 0.0, tracer->current_.scopes[GCTracer::Scope::MC_INCREMENTAL_FINALIZE]); // Sample is added because its ScopeId is listed as incremental sample. tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 100); - tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting, - "collector unittest"); + tracer->Start(GarbageCollector::MARK_COMPACTOR, + GarbageCollectionReason::kTesting, "collector unittest"); // Switch to incremental MC to enable writing back incremental scopes. tracer->current_.type = GCTracer::Event::INCREMENTAL_MARK_COMPACTOR; tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 100); - tracer->Stop(MARK_COMPACTOR); + tracer->Stop(GarbageCollector::MARK_COMPACTOR); EXPECT_DOUBLE_EQ( 200.0, tracer->current_.scopes[GCTracer::Scope::MC_INCREMENTAL_FINALIZE]); } @@ -211,15 +211,15 @@ TEST_F(GCTracerTest, IncrementalMarkingDetails) { // Round 1. tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 50); // Scavenger has no impact on incremental marking details. - tracer->Start(SCAVENGER, GarbageCollectionReason::kTesting, - "collector unittest"); - tracer->Stop(SCAVENGER); - tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting, + tracer->Start(GarbageCollector::SCAVENGER, GarbageCollectionReason::kTesting, "collector unittest"); + tracer->Stop(GarbageCollector::SCAVENGER); + tracer->Start(GarbageCollector::MARK_COMPACTOR, + GarbageCollectionReason::kTesting, "collector unittest"); // Switch to incremental MC to enable writing back incremental scopes. tracer->current_.type = GCTracer::Event::INCREMENTAL_MARK_COMPACTOR; tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 100); - tracer->Stop(MARK_COMPACTOR); + tracer->Stop(GarbageCollector::MARK_COMPACTOR); EXPECT_DOUBLE_EQ( 100, tracer->current_ @@ -239,12 +239,12 @@ TEST_F(GCTracerTest, IncrementalMarkingDetails) { // Round 2. Numbers should be reset. tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 13); tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 15); - tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting, - "collector unittest"); + tracer->Start(GarbageCollector::MARK_COMPACTOR, + GarbageCollectionReason::kTesting, "collector unittest"); // Switch to incremental MC to enable writing back incremental scopes. tracer->current_.type = GCTracer::Event::INCREMENTAL_MARK_COMPACTOR; tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 122); - tracer->Stop(MARK_COMPACTOR); + tracer->Stop(GarbageCollector::MARK_COMPACTOR); EXPECT_DOUBLE_EQ( 122, tracer->current_ @@ -276,24 +276,24 @@ TEST_F(GCTracerTest, IncrementalMarkingSpeed) { EXPECT_EQ(1000000 / 100, tracer->IncrementalMarkingSpeedInBytesPerMillisecond()); // Scavenger has no impact on incremental marking details. - tracer->Start(SCAVENGER, GarbageCollectionReason::kTesting, + tracer->Start(GarbageCollector::SCAVENGER, GarbageCollectionReason::kTesting, "collector unittest"); - tracer->Stop(SCAVENGER); + tracer->Stop(GarbageCollector::SCAVENGER); // 1000000 bytes in 100ms. tracer->AddIncrementalMarkingStep(100, 1000000); EXPECT_EQ(300, tracer->incremental_marking_duration_); EXPECT_EQ(3000000u, tracer->incremental_marking_bytes_); EXPECT_EQ(1000000 / 100, tracer->IncrementalMarkingSpeedInBytesPerMillisecond()); - tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting, - "collector unittest"); + tracer->Start(GarbageCollector::MARK_COMPACTOR, + GarbageCollectionReason::kTesting, "collector unittest"); // Switch to incremental MC. tracer->current_.type = GCTracer::Event::INCREMENTAL_MARK_COMPACTOR; // 1000000 bytes in 100ms. tracer->AddIncrementalMarkingStep(100, 1000000); EXPECT_EQ(400, tracer->incremental_marking_duration_); EXPECT_EQ(4000000u, tracer->incremental_marking_bytes_); - tracer->Stop(MARK_COMPACTOR); + tracer->Stop(GarbageCollector::MARK_COMPACTOR); EXPECT_EQ(400, tracer->current_.incremental_marking_duration); EXPECT_EQ(4000000u, tracer->current_.incremental_marking_bytes); EXPECT_EQ(0, tracer->incremental_marking_duration_); @@ -303,11 +303,11 @@ TEST_F(GCTracerTest, IncrementalMarkingSpeed) { // Round 2. tracer->AddIncrementalMarkingStep(2000, 1000); - tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting, - "collector unittest"); + tracer->Start(GarbageCollector::MARK_COMPACTOR, + GarbageCollectionReason::kTesting, "collector unittest"); // Switch to incremental MC. tracer->current_.type = GCTracer::Event::INCREMENTAL_MARK_COMPACTOR; - tracer->Stop(MARK_COMPACTOR); + tracer->Stop(GarbageCollector::MARK_COMPACTOR); EXPECT_DOUBLE_EQ((4000000.0 / 400 + 1000.0 / 2000) / 2, static_cast<double>( tracer->IncrementalMarkingSpeedInBytesPerMillisecond())); @@ -352,13 +352,13 @@ TEST_F(GCTracerTest, MutatorUtilization) { TEST_F(GCTracerTest, BackgroundScavengerScope) { GCTracer* tracer = i_isolate()->heap()->tracer(); tracer->ResetForTesting(); - tracer->Start(SCAVENGER, GarbageCollectionReason::kTesting, + tracer->Start(GarbageCollector::SCAVENGER, GarbageCollectionReason::kTesting, "collector unittest"); tracer->AddScopeSampleBackground( GCTracer::Scope::SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL, 10); tracer->AddScopeSampleBackground( GCTracer::Scope::SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL, 1); - tracer->Stop(SCAVENGER); + tracer->Stop(GarbageCollector::SCAVENGER); EXPECT_DOUBLE_EQ( 11, tracer->current_ .scopes[GCTracer::Scope::SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL]); @@ -367,8 +367,8 @@ TEST_F(GCTracerTest, BackgroundScavengerScope) { TEST_F(GCTracerTest, BackgroundMinorMCScope) { GCTracer* tracer = i_isolate()->heap()->tracer(); tracer->ResetForTesting(); - tracer->Start(MINOR_MARK_COMPACTOR, GarbageCollectionReason::kTesting, - "collector unittest"); + tracer->Start(GarbageCollector::MINOR_MARK_COMPACTOR, + GarbageCollectionReason::kTesting, "collector unittest"); tracer->AddScopeSampleBackground(GCTracer::Scope::MINOR_MC_BACKGROUND_MARKING, 10); tracer->AddScopeSampleBackground(GCTracer::Scope::MINOR_MC_BACKGROUND_MARKING, @@ -381,7 +381,7 @@ TEST_F(GCTracerTest, BackgroundMinorMCScope) { GCTracer::Scope::MINOR_MC_BACKGROUND_EVACUATE_UPDATE_POINTERS, 30); tracer->AddScopeSampleBackground( GCTracer::Scope::MINOR_MC_BACKGROUND_EVACUATE_UPDATE_POINTERS, 3); - tracer->Stop(MINOR_MARK_COMPACTOR); + tracer->Stop(GarbageCollector::MINOR_MARK_COMPACTOR); EXPECT_DOUBLE_EQ( 11, tracer->current_.scopes[GCTracer::Scope::MINOR_MC_BACKGROUND_MARKING]); @@ -401,14 +401,14 @@ TEST_F(GCTracerTest, BackgroundMajorMCScope) { 200); tracer->AddScopeSampleBackground(GCTracer::Scope::MC_BACKGROUND_MARKING, 10); // Scavenger should not affect the major mark-compact scopes. - tracer->Start(SCAVENGER, GarbageCollectionReason::kTesting, + tracer->Start(GarbageCollector::SCAVENGER, GarbageCollectionReason::kTesting, "collector unittest"); - tracer->Stop(SCAVENGER); + tracer->Stop(GarbageCollector::SCAVENGER); tracer->AddScopeSampleBackground(GCTracer::Scope::MC_BACKGROUND_SWEEPING, 20); tracer->AddScopeSampleBackground(GCTracer::Scope::MC_BACKGROUND_MARKING, 1); tracer->AddScopeSampleBackground(GCTracer::Scope::MC_BACKGROUND_SWEEPING, 2); - tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting, - "collector unittest"); + tracer->Start(GarbageCollector::MARK_COMPACTOR, + GarbageCollectionReason::kTesting, "collector unittest"); tracer->AddScopeSampleBackground(GCTracer::Scope::MC_BACKGROUND_EVACUATE_COPY, 30); tracer->AddScopeSampleBackground(GCTracer::Scope::MC_BACKGROUND_EVACUATE_COPY, @@ -417,7 +417,7 @@ TEST_F(GCTracerTest, BackgroundMajorMCScope) { GCTracer::Scope::MC_BACKGROUND_EVACUATE_UPDATE_POINTERS, 40); tracer->AddScopeSampleBackground( GCTracer::Scope::MC_BACKGROUND_EVACUATE_UPDATE_POINTERS, 4); - tracer->Stop(MARK_COMPACTOR); + tracer->Stop(GarbageCollector::MARK_COMPACTOR); EXPECT_DOUBLE_EQ( 111, tracer->current_.scopes[GCTracer::Scope::MC_BACKGROUND_MARKING]); EXPECT_DOUBLE_EQ( |