Commit 94523395 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Add UMA histograms for background GC work.

This adds the following histograms:
- V8.GCBackgroundMarking
- V8.GCBackgroundScavenger
- V8.GCBackgroundSweeping

Bug: chromium:792552
Change-Id: Iae6fa3258f4fe0d4ed5e415c541a6d29101893a9
Reviewed-on: https://chromium-review.googlesource.com/819530Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50005}
parent 94b4ad93
...@@ -1043,6 +1043,9 @@ class RuntimeCallTimerScope { ...@@ -1043,6 +1043,9 @@ class RuntimeCallTimerScope {
#define HISTOGRAM_RANGE_LIST(HR) \ #define HISTOGRAM_RANGE_LIST(HR) \
/* Generic range histograms: HR(name, caption, min, max, num_buckets) */ \ /* 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(detached_context_age_in_gc, V8.DetachedContextAgeInGC, 0, 20, 21) \ HR(detached_context_age_in_gc, V8.DetachedContextAgeInGC, 0, 20, 21) \
HR(code_cache_reject_reason, V8.CodeCacheRejectReason, 1, 6, 6) \ HR(code_cache_reject_reason, V8.CodeCacheRejectReason, 1, 6, 6) \
HR(errors_thrown_per_context, V8.ErrorsThrownPerContext, 0, 200, 20) \ HR(errors_thrown_per_context, V8.ErrorsThrownPerContext, 0, 200, 20) \
......
...@@ -968,6 +968,10 @@ void GCTracer::FetchBackgroundMarkCompactCounters() { ...@@ -968,6 +968,10 @@ void GCTracer::FetchBackgroundMarkCompactCounters() {
Scope::LAST_MC_BACKGROUND_SCOPE, Scope::LAST_MC_BACKGROUND_SCOPE,
BackgroundScope::FIRST_MC_BACKGROUND_SCOPE, BackgroundScope::FIRST_MC_BACKGROUND_SCOPE,
BackgroundScope::LAST_MC_BACKGROUND_SCOPE); BackgroundScope::LAST_MC_BACKGROUND_SCOPE);
heap_->isolate()->counters()->background_marking()->AddSample(
static_cast<int>(current_.scopes[Scope::MC_BACKGROUND_MARKING]));
heap_->isolate()->counters()->background_sweeping()->AddSample(
static_cast<int>(current_.scopes[Scope::MC_BACKGROUND_SWEEPING]));
} }
void GCTracer::FetchBackgroundMinorGCCounters() { void GCTracer::FetchBackgroundMinorGCCounters() {
...@@ -975,6 +979,9 @@ void GCTracer::FetchBackgroundMinorGCCounters() { ...@@ -975,6 +979,9 @@ void GCTracer::FetchBackgroundMinorGCCounters() {
Scope::LAST_MINOR_GC_BACKGROUND_SCOPE, Scope::LAST_MINOR_GC_BACKGROUND_SCOPE,
BackgroundScope::FIRST_MINOR_GC_BACKGROUND_SCOPE, BackgroundScope::FIRST_MINOR_GC_BACKGROUND_SCOPE,
BackgroundScope::LAST_MINOR_GC_BACKGROUND_SCOPE); BackgroundScope::LAST_MINOR_GC_BACKGROUND_SCOPE);
heap_->isolate()->counters()->background_scavenger()->AddSample(
static_cast<int>(
current_.scopes[Scope::SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL]));
} }
void GCTracer::FetchBackgroundGeneralCounters() { void GCTracer::FetchBackgroundGeneralCounters() {
......
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