Commit 21db1faf authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Add histogram counter for incremental marking time per GC cycle.

The name of the histogram is V8.GCIncrementalMarkingSum.

Bug: chromium:756592
Change-Id: Ib073e846054550cce8558a3a577a0451e3182407
Reviewed-on: https://chromium-review.googlesource.com/618877
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47422}
parent e143a4e7
......@@ -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) \
......
......@@ -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<int>(incremental_marking_duration_));
}
incremental_marking_bytes_ = 0;
incremental_marking_duration_ = 0;
for (int i = 0; i < Scope::NUMBER_OF_INCREMENTAL_SCOPES; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment