Commit 638993ae authored by Nikolaos Papaspyrou's avatar Nikolaos Papaspyrou Committed by V8 LUCI CQ

heap: Add total wall time for UMA events

The total wall time for GC reported to Blink is explicitly included in
UMA events. For the C++ managed heap, it is equal to the sum of the four
phases (mark, sweep, compact, weak). For the JS heap, it will be greater
than or equal to that sum in general.

Bug: chromium:1154636
Change-Id: Id710702b8e9d8db5c8d1eb4917deb6b760a77306
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3386596Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78611}
parent 302a5d20
......@@ -21,6 +21,7 @@ class Isolate;
namespace metrics {
struct GarbageCollectionPhases {
int64_t total_wall_clock_duration_in_us = -1;
int64_t compact_wall_clock_duration_in_us = -1;
int64_t mark_wall_clock_duration_in_us = -1;
int64_t sweep_wall_clock_duration_in_us = -1;
......
......@@ -1348,6 +1348,9 @@ void CopyTimeMetrics(
metrics.mark_wall_clock_duration_in_us = cppgc_metrics.mark_duration_us;
DCHECK_NE(-1, cppgc_metrics.sweep_duration_us);
metrics.sweep_wall_clock_duration_in_us = cppgc_metrics.sweep_duration_us;
metrics.total_wall_clock_duration_in_us =
metrics.mark_wall_clock_duration_in_us +
metrics.sweep_wall_clock_duration_in_us;
}
void CopyTimeMetrics(
......@@ -1361,6 +1364,11 @@ void CopyTimeMetrics(
metrics.sweep_wall_clock_duration_in_us = cppgc_metrics.sweep_duration_us;
DCHECK_NE(-1, cppgc_metrics.weak_duration_us);
metrics.weak_wall_clock_duration_in_us = cppgc_metrics.weak_duration_us;
metrics.total_wall_clock_duration_in_us =
metrics.compact_wall_clock_duration_in_us +
metrics.mark_wall_clock_duration_in_us +
metrics.sweep_wall_clock_duration_in_us +
metrics.weak_wall_clock_duration_in_us;
}
void CopySizeMetrics(
......
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