diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc index 0d7ee2e6a0..4c76d5733f 100644 --- a/src/heap/gc-tracer.cc +++ b/src/heap/gc-tracer.cc @@ -201,9 +201,7 @@ GCTracer::RecordGCPhasesInfo::RecordGCPhasesInfo(Heap* heap, const bool in_background = heap->isolate()->IsIsolateInBackground(); if (Heap::IsYoungGenerationCollector(collector)) { mode = Mode::Scavenger; - type_timer = counters->gc_scavenger(); - type_priority_timer = in_background ? counters->gc_scavenger_background() - : counters->gc_scavenger_foreground(); + type_timer = type_priority_timer = nullptr; } else { DCHECK_EQ(GarbageCollector::MARK_COMPACTOR, collector); if (heap->incremental_marking()->IsStopped()) { @@ -531,8 +529,6 @@ void GCTracer::StopCycle(GarbageCollector collector) { if (Heap::IsYoungGenerationCollector(collector)) { ReportYoungCycleToRecorder(); - counters->scavenge_reason()->AddSample(static_cast(gc_reason)); - // If a young generation GC interrupted an unfinished full GC cycle, restore // the event corresponding to the full GC cycle. if (young_gc_while_full_gc_) { @@ -1287,9 +1283,6 @@ void GCTracer::FetchBackgroundMarkCompactCounters() { void GCTracer::FetchBackgroundMinorGCCounters() { FetchBackgroundCounters(Scope::FIRST_MINOR_GC_BACKGROUND_SCOPE, Scope::LAST_MINOR_GC_BACKGROUND_SCOPE); - heap_->isolate()->counters()->background_scavenger()->AddSample( - static_cast( - current_.scopes[Scope::SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL])); } void GCTracer::FetchBackgroundGeneralCounters() { @@ -1404,10 +1397,6 @@ void GCTracer::RecordGCSumCounters(double atomic_pause_duration) { const double marking_background_duration = background_counter_[Scope::MC_BACKGROUND_MARKING].total_duration_ms; - // UMA. - heap_->isolate()->counters()->gc_mark_compactor()->AddSample( - static_cast(overall_duration)); - // Emit trace event counters. TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("v8.gc"), "V8.GCMarkCompactorSummary", TRACE_EVENT_SCOPE_THREAD, diff --git a/src/logging/counters-definitions.h b/src/logging/counters-definitions.h index 8ec4fea789..e9b71d56df 100644 --- a/src/logging/counters-definitions.h +++ b/src/logging/counters-definitions.h @@ -13,7 +13,6 @@ namespace internal { #define HISTOGRAM_RANGE_LIST(HR) \ /* Generic range histograms: HR(name, caption, min, max, num_buckets) */ \ HR(background_marking, V8.GCBackgroundMarking, 0, 10000, 101) \ - HR(background_scavenger, V8.GCBackgroundScavenger, 0, 10000, 101) \ HR(background_sweeping, V8.GCBackgroundSweeping, 0, 10000, 101) \ HR(code_cache_reject_reason, V8.CodeCacheRejectReason, 1, 6, 6) \ HR(errors_thrown_per_context, V8.ErrorsThrownPerContext, 0, 200, 20) \ @@ -32,13 +31,10 @@ namespace internal { HR(gc_finalize_sweep, V8.GCFinalizeMC.Sweep, 0, 10000, 101) \ HR(gc_scavenger_scavenge_main, V8.GCScavenger.ScavengeMain, 0, 10000, 101) \ HR(gc_scavenger_scavenge_roots, V8.GCScavenger.ScavengeRoots, 0, 10000, 101) \ - HR(gc_mark_compactor, V8.GCMarkCompactor, 0, 10000, 101) \ HR(gc_marking_sum, V8.GCMarkingSum, 0, 10000, 101) \ /* Range and bucket matches BlinkGC.MainThreadMarkingThroughput. */ \ HR(gc_main_thread_marking_throughput, V8.GCMainThreadMarkingThroughput, 0, \ 100000, 50) \ - HR(scavenge_reason, V8.GCScavengeReason, 0, \ - kGarbageCollectionReasonMaxValue, kGarbageCollectionReasonMaxValue + 1) \ HR(young_generation_handling, V8.GCYoungGenerationHandling, 0, 2, 3) \ /* Asm/Wasm. */ \ HR(wasm_functions_per_asm_module, V8.WasmFunctionsPerModule.asm, 1, 1000000, \ @@ -172,9 +168,6 @@ namespace internal { V8.GCFinalizeMCReduceMemoryBackground, 10000, MILLISECOND) \ HT(gc_finalize_reduce_memory_foreground, \ V8.GCFinalizeMCReduceMemoryForeground, 10000, MILLISECOND) \ - HT(gc_scavenger, V8.GCScavenger, 10000, MILLISECOND) \ - HT(gc_scavenger_background, V8.GCScavengerBackground, 10000, MILLISECOND) \ - HT(gc_scavenger_foreground, V8.GCScavengerForeground, 10000, MILLISECOND) \ HT(measure_memory_delay_ms, V8.MeasureMemoryDelayMilliseconds, 100000, \ MILLISECOND) \ HT(gc_time_to_global_safepoint, V8.GC.TimeToGlobalSafepoint, 10000000, \ diff --git a/test/unittests/heap/gc-tracer-unittest.cc b/test/unittests/heap/gc-tracer-unittest.cc index d683e76559..d462218936 100644 --- a/test/unittests/heap/gc-tracer-unittest.cc +++ b/test/unittests/heap/gc-tracer-unittest.cc @@ -568,29 +568,5 @@ TEST_F(GCTracerTest, RecordScavengerHistograms) { GcHistogram::CleanUp(); } -TEST_F(GCTracerTest, RecordGCSumHistograms) { - if (FLAG_stress_incremental_marking) return; - isolate()->SetCreateHistogramFunction(&GcHistogram::CreateHistogram); - isolate()->SetAddHistogramSampleFunction(&GcHistogram::AddHistogramSample); - GCTracer* tracer = i_isolate()->heap()->tracer(); - tracer->ResetForTesting(); - StartTracing(tracer, GarbageCollector::MARK_COMPACTOR, - StartTracingMode::kIncrementalStart); - tracer->current_ - .incremental_marking_scopes[GCTracer::Scope::MC_INCREMENTAL_START] - .duration = 1; - tracer->current_ - .incremental_marking_scopes[GCTracer::Scope::MC_INCREMENTAL_SWEEPING] - .duration = 2; - tracer->AddIncrementalMarkingStep(3.0, 1024); - tracer->current_ - .incremental_marking_scopes[GCTracer::Scope::MC_INCREMENTAL_FINALIZE] - .duration = 4; - const double atomic_pause_duration = 5.0; - tracer->RecordGCSumCounters(atomic_pause_duration); - EXPECT_EQ(15, GcHistogram::Get("V8.GCMarkCompactor")->Total()); - GcHistogram::CleanUp(); -} - } // namespace internal } // namespace v8