Commit 7d5538e2 authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[heap] Add histogram for time-to-safepoint for UMA

Adds new histogram V8.TimeToSafepoint to measure the time needed to
reach a global safepoint/stop-the-world.

Bug: v8:10315
Change-Id: I77701b26dfd47e04d64c4ecba3c47530ff8b9485
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2308390Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68959}
parent c0a11e49
......@@ -7,7 +7,7 @@
#include "src/handles/local-handles.h"
#include "src/handles/persistent-handles.h"
#include "src/heap/gc-tracer.h"
#include "src/heap/heap.h"
#include "src/heap/heap-inl.h"
#include "src/heap/local-heap.h"
namespace v8 {
......@@ -25,6 +25,7 @@ void GlobalSafepoint::EnterSafepointScope() {
if (++active_safepoint_scopes_ > 1) return;
TimedHistogramScope timer(heap_->isolate()->counters()->time_to_safepoint());
TRACE_GC(heap_->tracer(), GCTracer::Scope::STOP_THE_WORLD);
local_heaps_mutex_.Lock();
......
......@@ -138,6 +138,7 @@ namespace internal {
HT(gc_scavenger, V8.GCScavenger, 10000, MILLISECOND) \
HT(gc_scavenger_background, V8.GCScavengerBackground, 10000, MILLISECOND) \
HT(gc_scavenger_foreground, V8.GCScavengerForeground, 10000, MILLISECOND) \
HT(time_to_safepoint, V8.TimeToSafepoint, 10000, MILLISECOND) \
HT(measure_memory_delay_ms, V8.MeasureMemoryDelayMilliseconds, 100000, \
MILLISECOND) \
/* TurboFan timers. */ \
......
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