Commit 0cd79797 authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[heap] Increase limit of histograms to 1 second and rename them

10ms is most likely too short, this also forces us to rename those
metrics. Also rename the corresponding tracing events.

Bug: v8:10315
Change-Id: I42fb1572b150f15cf12c2b02444f015fae349344
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2652494Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72400}
parent e0644bbb
......@@ -70,9 +70,13 @@ void CollectionBarrier::StopTimeToCollectionTimer() {
DCHECK(timer_.IsStarted());
base::TimeDelta delta = timer_.Elapsed();
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"V8.TimeToCollection", TRACE_EVENT_SCOPE_THREAD,
"duration", delta.InMillisecondsF());
heap_->isolate()->counters()->time_to_collection()->AddTimedSample(delta);
"V8.GC.TimeToCollectionOnBackground",
TRACE_EVENT_SCOPE_THREAD, "duration",
delta.InMillisecondsF());
heap_->isolate()
->counters()
->gc_time_to_collection_on_background()
->AddTimedSample(delta);
timer_.Stop();
} else {
DCHECK_EQ(old_state, RequestState::kDefault);
......
......@@ -573,7 +573,7 @@ void GCTracer::PrintNVP() const {
"mutator=%.1f "
"gc=%s "
"reduce_memory=%d "
"stop_the_world=%.2f "
"time_to_safepoint=%.2f "
"heap.prologue=%.2f "
"heap.epilogue=%.2f "
"heap.epilogue.reduce_new_space=%.2f "
......@@ -615,7 +615,7 @@ void GCTracer::PrintNVP() const {
"unmapper_chunks=%d "
"context_disposal_rate=%.1f\n",
duration, spent_in_mutator, current_.TypeName(true),
current_.reduce_memory, current_.scopes[Scope::STOP_THE_WORLD],
current_.reduce_memory, current_.scopes[Scope::TIME_TO_SAFEPOINT],
current_.scopes[Scope::HEAP_PROLOGUE],
current_.scopes[Scope::HEAP_EPILOGUE],
current_.scopes[Scope::HEAP_EPILOGUE_REDUCE_NEW_SPACE],
......@@ -662,7 +662,7 @@ void GCTracer::PrintNVP() const {
"reduce_memory=%d "
"minor_mc=%.2f "
"finish_sweeping=%.2f "
"stop_the_world=%.2f "
"time_to_safepoint=%.2f "
"mark=%.2f "
"mark.seed=%.2f "
"mark.roots=%.2f "
......@@ -686,7 +686,7 @@ void GCTracer::PrintNVP() const {
duration, spent_in_mutator, "mmc", current_.reduce_memory,
current_.scopes[Scope::MINOR_MC],
current_.scopes[Scope::MINOR_MC_SWEEPING],
current_.scopes[Scope::STOP_THE_WORLD],
current_.scopes[Scope::TIME_TO_SAFEPOINT],
current_.scopes[Scope::MINOR_MC_MARK],
current_.scopes[Scope::MINOR_MC_MARK_SEED],
current_.scopes[Scope::MINOR_MC_MARK_ROOTS],
......@@ -716,7 +716,7 @@ void GCTracer::PrintNVP() const {
"mutator=%.1f "
"gc=%s "
"reduce_memory=%d "
"stop_the_world=%.2f "
"time_to_safepoint=%.2f "
"heap.prologue=%.2f "
"heap.embedder_tracing_epilogue=%.2f "
"heap.epilogue=%.2f "
......@@ -808,7 +808,7 @@ void GCTracer::PrintNVP() const {
"context_disposal_rate=%.1f "
"compaction_speed=%.f\n",
duration, spent_in_mutator, current_.TypeName(true),
current_.reduce_memory, current_.scopes[Scope::STOP_THE_WORLD],
current_.reduce_memory, current_.scopes[Scope::TIME_TO_SAFEPOINT],
current_.scopes[Scope::HEAP_PROLOGUE],
current_.scopes[Scope::HEAP_EMBEDDER_TRACING_EPILOGUE],
current_.scopes[Scope::HEAP_EPILOGUE],
......
......@@ -22,8 +22,9 @@ void GlobalSafepoint::EnterSafepointScope() {
if (++active_safepoint_scopes_ > 1) return;
TimedHistogramScope timer(heap_->isolate()->counters()->stop_the_world());
TRACE_GC(heap_->tracer(), GCTracer::Scope::STOP_THE_WORLD);
TimedHistogramScope timer(
heap_->isolate()->counters()->gc_time_to_safepoint());
TRACE_GC(heap_->tracer(), GCTracer::Scope::TIME_TO_SAFEPOINT);
local_heaps_mutex_.Lock();
......
......@@ -510,7 +510,7 @@
F(SCAVENGER_SCAVENGE_WEAK) \
F(SCAVENGER_SCAVENGE_FINALIZE) \
F(SCAVENGER_SWEEP_ARRAY_BUFFERS) \
F(STOP_THE_WORLD) \
F(TIME_TO_SAFEPOINT) \
F(UNMAPPER)
#define TRACER_BACKGROUND_SCOPES(F) \
......
......@@ -140,8 +140,9 @@ namespace internal {
HT(gc_scavenger_foreground, V8.GCScavengerForeground, 10000, MILLISECOND) \
HT(measure_memory_delay_ms, V8.MeasureMemoryDelayMilliseconds, 100000, \
MILLISECOND) \
HT(stop_the_world, V8.StopTheWorld, 10000, MICROSECOND) \
HT(time_to_collection, V8.TimeToCollection, 10000, MICROSECOND) \
HT(gc_time_to_safepoint, V8.GC.TimeToSafepoint, 10000000, MICROSECOND) \
HT(gc_time_to_collection_on_background, V8.GC.TimeToCollectionOnBackground, \
10000000, MICROSECOND) \
/* TurboFan timers. */ \
HT(turbofan_optimize_prepare, V8.TurboFanOptimizePrepare, 1000000, \
MICROSECOND) \
......
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