diff --git a/src/counters.h b/src/counters.h index d8f350b278..9fa90fa170 100644 --- a/src/counters.h +++ b/src/counters.h @@ -991,12 +991,13 @@ class RuntimeCallTimerScope { }; #define HISTOGRAM_RANGE_LIST(HR) \ - /* Generic range histograms */ \ + /* Generic range histograms: HR(name, caption, min, max, num_buckets) */ \ HR(detached_context_age_in_gc, V8.DetachedContextAgeInGC, 0, 20, 21) \ HR(code_cache_reject_reason, V8.CodeCacheRejectReason, 1, 6, 6) \ HR(errors_thrown_per_context, V8.ErrorsThrownPerContext, 0, 200, 20) \ HR(debug_feature_usage, V8.DebugFeatureUsage, 1, 7, 7) \ HR(incremental_marking_reason, V8.GCIncrementalMarkingReason, 0, 21, 22) \ + HR(incremental_marking_sum, V8.GCIncrementalMarkingSum, 0, 10000, 101) \ HR(mark_compact_reason, V8.GCMarkCompactReason, 0, 21, 22) \ HR(scavenge_reason, V8.GCScavengeReason, 0, 21, 22) \ HR(young_generation_handling, V8.GCYoungGenerationHandling, 0, 2, 3) \ diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc index 287f62dea0..8bcf25b0e0 100644 --- a/src/heap/gc-tracer.cc +++ b/src/heap/gc-tracer.cc @@ -217,6 +217,10 @@ void GCTracer::Start(GarbageCollector collector, } void GCTracer::ResetIncrementalMarkingCounters() { + if (incremental_marking_duration_ > 0) { + heap_->isolate()->counters()->incremental_marking_sum()->AddSample( + static_cast(incremental_marking_duration_)); + } incremental_marking_bytes_ = 0; incremental_marking_duration_ = 0; for (int i = 0; i < Scope::NUMBER_OF_INCREMENTAL_SCOPES; i++) {