diff --git a/third_party/blink/renderer/bindings/core/v8/v8_metrics.cc b/third_party/blink/renderer/bindings/core/v8/v8_metrics.cc index 69711164e4fb2e..3a1cf177ff8e3a 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_metrics.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_metrics.cc @@ -86,11 +86,6 @@ void V8MetricsRecorder::AddMainThreadEvent( namespace { #if BUILDFLAG(USE_V8_OILPAN) -void ReportAtomicLatencyEvent(int64_t duration_us) { - UMA_HISTOGRAM_TIMES("V8.GC.Event.MainThread.Full.Atomic.Cpp", - base::TimeDelta::FromMicroseconds(duration_us)); -} - // Helper function to convert a byte count to a KB count, capping at // INT_MAX if the number is larger than that. constexpr int32_t CappedSizeInKB(int64_t size_in_bytes) { @@ -179,31 +174,30 @@ void V8MetricsRecorder::AddMainThreadEvent( base::TimeDelta::FromMicroseconds( event.main_thread_cpp.sweep_wall_clock_duration_in_us)); - // Report latency metrics: + // Report atomic pause metrics: UMA_HISTOGRAM_TIMES( - "V8.GC.Event.MainThread.Full.Atomic.Mark.Cpp", + "V8.GC.Cycle.MainThread.Full.Atomic.Mark.Cpp", base::TimeDelta::FromMicroseconds( event.main_thread_atomic_cpp.mark_wall_clock_duration_in_us)); UMA_HISTOGRAM_TIMES( - "V8.GC.Event.MainThread.Full.Atomic.Weak.Cpp", + "V8.GC.Cycle.MainThread.Full.Atomic.Weak.Cpp", base::TimeDelta::FromMicroseconds( event.main_thread_atomic_cpp.weak_wall_clock_duration_in_us)); UMA_HISTOGRAM_TIMES( - "V8.GC.Event.MainThread.Full.Atomic.Compact.Cpp", + "V8.GC.Cycle.MainThread.Full.Atomic.Compact.Cpp", base::TimeDelta::FromMicroseconds( event.main_thread_atomic_cpp.compact_wall_clock_duration_in_us)); UMA_HISTOGRAM_TIMES( - "V8.GC.Event.MainThread.Full.Atomic.Sweep.Cpp", + "V8.GC.Cycle.MainThread.Full.Atomic.Sweep.Cpp", + base::TimeDelta::FromMicroseconds( + event.main_thread_atomic_cpp.sweep_wall_clock_duration_in_us)); + UMA_HISTOGRAM_TIMES( + "V8.GC.Cycle.MainThread.Full.Atomic.Cpp", base::TimeDelta::FromMicroseconds( + event.main_thread_atomic_cpp.mark_wall_clock_duration_in_us + + event.main_thread_atomic_cpp.weak_wall_clock_duration_in_us + + event.main_thread_atomic_cpp.compact_wall_clock_duration_in_us + event.main_thread_atomic_cpp.sweep_wall_clock_duration_in_us)); - ReportAtomicLatencyEvent( - event.main_thread_atomic_cpp.mark_wall_clock_duration_in_us); - ReportAtomicLatencyEvent( - event.main_thread_atomic_cpp.weak_wall_clock_duration_in_us); - ReportAtomicLatencyEvent( - event.main_thread_atomic_cpp.compact_wall_clock_duration_in_us); - ReportAtomicLatencyEvent( - event.main_thread_atomic_cpp.sweep_wall_clock_duration_in_us); // Report size metrics: static constexpr size_t kMinSize = 1; diff --git a/tools/metrics/histograms/metadata/v8/histograms.xml b/tools/metrics/histograms/metadata/v8/histograms.xml index a144b43fc4396f..5f5f95903f42f2 100644 --- a/tools/metrics/histograms/metadata/v8/histograms.xml +++ b/tools/metrics/histograms/metadata/v8/histograms.xml @@ -457,6 +457,66 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. + + omerkatz@chromium.org + v8-memory-sheriffs@google.com + + Overall duration of compaction on the main thread during the atomic pause of + a garbage collection of the managed C++ heap. There is only a single atomic + pause compaction event per cycle but it may cover several sub-events. + Reported at the end of the garbage collection cycle. + + + + + omerkatz@chromium.org + v8-memory-sheriffs@google.com + + Overall main thread duration of the atomic pause of a garbage collection of + the managed C++ heap. There is only a single atomic pause event per cycle + but it may cover several sub-events. Reported at the end of the garbage + collection cycle. + + + + + omerkatz@chromium.org + v8-memory-sheriffs@google.com + + Overall duration of marking on the main thread during the atomic pause of a + garbage collection of the managed C++ heap. There is only a single atomic + pause marking event per cycle but it may cover several sub-events. Reported + at the end of the garbage collection cycle. + + + + + omerkatz@chromium.org + v8-memory-sheriffs@google.com + + Overall duration of sweeping on the main thread during the atomic pasue of a + garbage collection of the managed C++ heap. There is only a single atomic + pause sweeping event per cycle but it may cover several sub-events. Reported + at the end of the garbage collection cycle. + + + + + omerkatz@chromium.org + v8-memory-sheriffs@google.com + + Overall duration of weakness handling on the main thread during the atomic + pause of a garbage collection of the managed C++ heap. There is only a + single atomic pause weakness handling event per cycle but it may cover + several sub-events. Reported at the end of the garbage collection cycle. + + + omerkatz@chromium.org @@ -553,6 +613,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. + + Removed 09/2021. Renamed to V8.GC.Cycle.MainThread.Full.Atomic.Compact.Cpp. + omerkatz@chromium.org v8-memory-sheriffs@google.com @@ -563,6 +626,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. + + Removed 09/2021. Renamed to V8.GC.Cycle.MainThread.Full.Atomic.Cpp. + omerkatz@chromium.org v8-memory-sheriffs@google.com @@ -573,6 +639,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. + + Removed 09/2021. Renamed to V8.GC.Cycle.MainThread.Full.Atomic.Mark.Cpp. + omerkatz@chromium.org v8-memory-sheriffs@google.com @@ -583,6 +652,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. + + Removed 09/2021. Renamed to V8.GC.Cycle.MainThread.Full.Atomic.Sweep.Cpp. + omerkatz@chromium.org v8-memory-sheriffs@google.com @@ -593,6 +665,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. + + Removed 09/2021. Renamed to V8.GC.Cycle.MainThread.Full.Atomic.Weak.Cpp. + omerkatz@chromium.org v8-memory-sheriffs@google.com