Add input hint [v8/v8 : main]

0 views
Skip to first unread message

Thiabaud Engelbrecht (Gerrit)

unread,
Nov 25, 2025, 1:23:26 PM11/25/25
to Etienne Pierre-Doray, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Etienne Pierre-Doray

Thiabaud Engelbrecht added 2 comments

File src/heap/heap.h
Line 2588, Patchset 3: perfetto::DynamicString track_name,
Etienne Pierre-Doray . resolved

Use perfetto::StaticString instead.
Also you could pass perfetto::NamedTrack directly as argument, and let the caller create the track.

Thiabaud Engelbrecht

Done

File src/heap/heap.cc
Line 7835, Patchset 3: TRACE_EVENT_BEGIN(TRACE_DISABLED_BY_DEFAULT("v8.gc"), "IsLoading", track_);
Etienne Pierre-Doray . resolved

Renamed to either "Active" or plumb the appropriate name from Heap as a StaticString.

Thiabaud Engelbrecht

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Etienne Pierre-Doray
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
Gerrit-Change-Number: 7201825
Gerrit-PatchSet: 4
Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Comment-Date: Tue, 25 Nov 2025 18:23:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Etienne Pierre-Doray <etie...@chromium.org>
unsatisfied_requirement
open
diffy

Benoit Lize (Gerrit)

unread,
Nov 26, 2025, 11:25:02 AM11/26/25
to Thiabaud Engelbrecht, Etienne Pierre-Doray, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Etienne Pierre-Doray and Thiabaud Engelbrecht

Benoit Lize added 4 comments

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Benoit Lize . resolved

High level comments:
Right now the implementation of loading and input are shared, but this is likely not what we want: one if for throughput, the other one for responsiveness.

For instance, we may not want to change GC limits for input, just to temporarily waive the limit (up to a point), whereas the reset logic for limit for loading would be different (since we expect the live heap to grow, and a lot of garbage to be generated).

Also we need to handle stacking of the two hints.

So I would suggest:

  • Inline the conditions like "IsLoading() and IsInputHandling()" in the calling code
  • Make sure that they stack correctly

Also, is it possible to add tests? In particular, can you test the stacking? So something like input while loading, and weird overlaps like that.

File src/heap/heap.h
Line 2585, Patchset 4 (Latest): class HighResponsivenessModeState {
Benoit Lize . unresolved

nit: what about naming this something like GCHintState or something?

And then you can make use an enum for the two types of hints:

  enum class GCHintType {
kNone,
kLoading,
kInputHandling
}
Line 2086, Patchset 4 (Latest): bool IsHighResponsivenessMode() const {
Benoit Lize . unresolved

nitpicking: this is not really about responsiveness in both cases, this is about:

  • Throughput for loading
  • Main thread responsiveness for input.

Right now, they resolve to the same implementation, but this is unlikely to be the optimal one. So perhaps do not add something here, and call out the use cases specifically inline in the code?

Line 2081, Patchset 4 (Latest): static const int kMaxInputHandlingTimeMs = 3000;
Benoit Lize . unresolved

Add a comment explaining why this delay.

In particular I think you need to explain that there is a max in case the client never resets the flag, and that "input" can actually be long running, for instance scrolling.

Open in Gerrit

Related details

Attention is currently required from:
  • Etienne Pierre-Doray
  • Thiabaud Engelbrecht
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
    Gerrit-Change-Number: 7201825
    Gerrit-PatchSet: 4
    Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-CC: Benoit Lize <li...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Comment-Date: Wed, 26 Nov 2025 16:24:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Michael Lippautz (Gerrit)

    unread,
    Nov 26, 2025, 11:34:23 AM11/26/25
    to Thiabaud Engelbrecht, Benoit Lize, Etienne Pierre-Doray, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Etienne Pierre-Doray and Thiabaud Engelbrecht

    Michael Lippautz added 1 comment

    Patchset-level comments
    Benoit Lize . unresolved

    High level comments:
    Right now the implementation of loading and input are shared, but this is likely not what we want: one if for throughput, the other one for responsiveness.

    For instance, we may not want to change GC limits for input, just to temporarily waive the limit (up to a point), whereas the reset logic for limit for loading would be different (since we expect the live heap to grow, and a lot of garbage to be generated).

    Also we need to handle stacking of the two hints.

    So I would suggest:

    • Inline the conditions like "IsLoading() and IsInputHandling()" in the calling code
    • Make sure that they stack correctly

    Also, is it possible to add tests? In particular, can you test the stacking? So something like input while loading, and weird overlaps like that.

    Michael Lippautz

    I requested a design doc for this particular project that asked for:
    1. splitting of the signal (which is done)
    2. finding memory limits that are reasonable for for delaying GC (as loading is effectively disabling it for most parts) (wip)
    3. Figuring out returning after the "scope" was left. Stacking is triggering similar cases. (wip)

    I think the CL is going in the right direction but given your comments/questions here Benoit (and the fact that I want to see very similar things), I wonder if we shouldn't pause it until these questions are answered on a design doc.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Etienne Pierre-Doray
    • Thiabaud Engelbrecht
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
    Gerrit-Change-Number: 7201825
    Gerrit-PatchSet: 4
    Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-CC: Benoit Lize <li...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Comment-Date: Wed, 26 Nov 2025 16:34:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Benoit Lize <li...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Thiabaud Engelbrecht (Gerrit)

    unread,
    Dec 4, 2025, 2:25:38 PM12/4/25
    to AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, Etienne Pierre-Doray, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Benoit Lize and Etienne Pierre-Doray

    Thiabaud Engelbrecht added 3 comments

    File src/heap/heap.h
    Line 2585, Patchset 4: class HighResponsivenessModeState {
    Benoit Lize . resolved

    nit: what about naming this something like GCHintState or something?

    And then you can make use an enum for the two types of hints:

      enum class GCHintType {
    kNone,
    kLoading,
    kInputHandling
    }
    Thiabaud Engelbrecht

    Done

    Line 2086, Patchset 4: bool IsHighResponsivenessMode() const {
    Benoit Lize . resolved

    nitpicking: this is not really about responsiveness in both cases, this is about:

    • Throughput for loading
    • Main thread responsiveness for input.

    Right now, they resolve to the same implementation, but this is unlikely to be the optimal one. So perhaps do not add something here, and call out the use cases specifically inline in the code?

    Thiabaud Engelbrecht

    Done

    Line 2081, Patchset 4: static const int kMaxInputHandlingTimeMs = 3000;
    Benoit Lize . resolved

    Add a comment explaining why this delay.

    In particular I think you need to explain that there is a max in case the client never resets the flag, and that "input" can actually be long running, for instance scrolling.

    Thiabaud Engelbrecht

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benoit Lize
    • Etienne Pierre-Doray
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
    Gerrit-Change-Number: 7201825
    Gerrit-PatchSet: 6
    Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-CC: Benoit Lize <li...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Benoit Lize <li...@chromium.org>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Comment-Date: Thu, 04 Dec 2025 19:25:34 +0000
    unsatisfied_requirement
    open
    diffy

    Etienne Pierre-Doray (Gerrit)

    unread,
    Dec 8, 2025, 3:16:24 PM12/8/25
    to Thiabaud Engelbrecht, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Benoit Lize and Thiabaud Engelbrecht

    Etienne Pierre-Doray added 5 comments

    File src/heap/heap.cc
    Line 1769, Patchset 6 (Latest): update_allocation_limits_after_loading_ = true;
    Etienne Pierre-Doray . unresolved

    Since the exit code is different, I think we need a update_allocation_limits_after_input_ instead.

    Line 2022, Patchset 6 (Latest): RecomputeLimitsAfterLoadingIfNeeded();
    Etienne Pierre-Doray . unresolved

    We'll need to call RecomputeLimitsAfterInputHandlingIfNeeded() as well; this is what prevents us from hitting the overshoot limit.

    Line 2749, Patchset 6 (Latest):void Heap::RecomputeLimitsAfterInputHandlingIfNeeded() {
    Etienne Pierre-Doray . unresolved

    Similar to update_allocation_limits_after_loading_, I think we need a update_allocation_limits_after_input_ here (to honour the "IfNeeded" part). The "recompute" happens:

    • at the beginning of incremental marking
    • when exiting loading/input state

    Why not just look at IsLoading/IsInputHandling? AFAIU, this would work if we rely on timeout, but since we might not get the end notification, we want to make the update_allocation_limits_after_* persistent if the state changes without a notification.

    Line 5686, Patchset 6 (Latest): if (!v8_flags.external_memory_accounted_in_global_limit) {
    size_now += AllocatedExternalMemorySinceMarkCompact();
    }
    Etienne Pierre-Doray . unresolved

    Let's not include this; this is essentially a bug but I kept the behavior in AllocationLimitOvershotByLargeMargin to experiement.

    Line 7898, Patchset 6 (Latest): if (!heap->IsLoading() && !heap->IsInputHandling()) {
    (heap->*callback_)();
    // heap->RecomputeLimitsAfterHighResponsivenessModeIfNeeded();
    if (auto* job = heap->incremental_marking()->incremental_marking_job()) {
    // The task will start incremental marking (if needed not already started)
    // and advance marking if incremental marking is active.
    job->ScheduleTask();
    }
    }
    Etienne Pierre-Doray . unresolved

    High-level comment: Effectively I believe the desired behavior is:

    • when exiting input, call RecomputeLimitsAfterInputHandlingIfNeeded if !IsLoading()
    • when exiting loading, call RecomputeLimitsAfterLoadingIfNeeded

    Since we have 2 different calls and different condidtions, I don't think we gain anything from placing this in GCHintState. It seems i'd be simpler if called directly from NotifyInputHandlingEnded() and NotifyLoadingEnded()

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benoit Lize
    • Thiabaud Engelbrecht
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
    Gerrit-Change-Number: 7201825
    Gerrit-PatchSet: 6
    Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-CC: Benoit Lize <li...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Attention: Benoit Lize <li...@chromium.org>
    Gerrit-Comment-Date: Mon, 08 Dec 2025 20:16:21 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Michael Lippautz (Gerrit)

    unread,
    Dec 9, 2025, 8:45:33 AM12/9/25
    to Thiabaud Engelbrecht, Dominik Inführ, AyeAye, Code Review Nudger, Benoit Lize, Etienne Pierre-Doray, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Benoit Lize, Dominik Inführ and Thiabaud Engelbrecht

    Michael Lippautz added 1 comment

    Patchset-level comments
    File-level comment, Patchset 7 (Latest):
    Michael Lippautz . resolved

    +dinfuehr

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benoit Lize
    • Dominik Inführ
    • Thiabaud Engelbrecht
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
    Gerrit-Change-Number: 7201825
    Gerrit-PatchSet: 7
    Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-CC: Benoit Lize <li...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Attention: Benoit Lize <li...@chromium.org>
    Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Dec 2025 13:45:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Thiabaud Engelbrecht (Gerrit)

    unread,
    Dec 9, 2025, 11:57:57 AM12/9/25
    to Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, Etienne Pierre-Doray, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Benoit Lize, Dominik Inführ and Etienne Pierre-Doray

    Thiabaud Engelbrecht added 5 comments

    File src/heap/heap.cc
    Line 1769, Patchset 6: update_allocation_limits_after_loading_ = true;
    Etienne Pierre-Doray . resolved

    Since the exit code is different, I think we need a update_allocation_limits_after_input_ instead.

    Thiabaud Engelbrecht

    Done

    Line 2022, Patchset 6: RecomputeLimitsAfterLoadingIfNeeded();
    Etienne Pierre-Doray . resolved

    We'll need to call RecomputeLimitsAfterInputHandlingIfNeeded() as well; this is what prevents us from hitting the overshoot limit.

    Thiabaud Engelbrecht

    Done

    Line 2749, Patchset 6:void Heap::RecomputeLimitsAfterInputHandlingIfNeeded() {
    Etienne Pierre-Doray . resolved

    Similar to update_allocation_limits_after_loading_, I think we need a update_allocation_limits_after_input_ here (to honour the "IfNeeded" part). The "recompute" happens:

    • at the beginning of incremental marking
    • when exiting loading/input state

    Why not just look at IsLoading/IsInputHandling? AFAIU, this would work if we rely on timeout, but since we might not get the end notification, we want to make the update_allocation_limits_after_* persistent if the state changes without a notification.

    Thiabaud Engelbrecht

    Done

    Line 5686, Patchset 6: if (!v8_flags.external_memory_accounted_in_global_limit) {
    size_now += AllocatedExternalMemorySinceMarkCompact();
    }
    Etienne Pierre-Doray . resolved

    Let's not include this; this is essentially a bug but I kept the behavior in AllocationLimitOvershotByLargeMargin to experiement.

    Thiabaud Engelbrecht

    Done

    Line 7898, Patchset 6: if (!heap->IsLoading() && !heap->IsInputHandling()) {

    (heap->*callback_)();
    // heap->RecomputeLimitsAfterHighResponsivenessModeIfNeeded();
    if (auto* job = heap->incremental_marking()->incremental_marking_job()) {
    // The task will start incremental marking (if needed not already started)
    // and advance marking if incremental marking is active.
    job->ScheduleTask();
    }
    }
    Etienne Pierre-Doray . resolved

    High-level comment: Effectively I believe the desired behavior is:

    • when exiting input, call RecomputeLimitsAfterInputHandlingIfNeeded if !IsLoading()
    • when exiting loading, call RecomputeLimitsAfterLoadingIfNeeded

    Since we have 2 different calls and different condidtions, I don't think we gain anything from placing this in GCHintState. It seems i'd be simpler if called directly from NotifyInputHandlingEnded() and NotifyLoadingEnded()

    Thiabaud Engelbrecht

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benoit Lize
    • Dominik Inführ
    • Etienne Pierre-Doray
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
    Gerrit-Change-Number: 7201825
    Gerrit-PatchSet: 7
    Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-CC: Benoit Lize <li...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Benoit Lize <li...@chromium.org>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Dec 2025 16:57:53 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Etienne Pierre-Doray <etie...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Etienne Pierre-Doray (Gerrit)

    unread,
    Dec 9, 2025, 12:54:15 PM12/9/25
    to Thiabaud Engelbrecht, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Benoit Lize, Dominik Inführ and Thiabaud Engelbrecht

    Etienne Pierre-Doray added 4 comments

    File include/v8-isolate.h
    Line 1550, Patchset 7 (Latest):
    Etienne Pierre-Doray . unresolved

    Let's add documentation on this method.

    File src/heap/heap.cc
    Line 7879, Patchset 7 (Latest): if (!IsLoading() && !IsInputHandling()) {
    Etienne Pierre-Doray . unresolved

    I think we should do this even if IsInputHandling() == true.
    `IsLoading()` should always be true.
    So RecomputeLimitsAfterLoadingIfNeeded() can be called unconditionally.

    Line 7890, Patchset 7 (Latest): if (!IsLoading() && !IsInputHandling()) {
    Etienne Pierre-Doray . unresolved

    I think just `IsLoading()` is sufficient, `!IsInputHandling()` should always be true here.

    Line 7905, Patchset 7 (Latest):void Heap::NotifyLoadingEnded() { loading_state_.NotifyEnded(this); }
    Etienne Pierre-Doray . unresolved

    I don't think we gain in code reuse going through `callback_`. How about:

    ```
    void Heap::NotifyLoadingEnded() {
    loading_state_.NotifyEnded(this);
    RecomputeLimitsAfterLoadingIfNeeded();
    if (auto* job = incremental_marking()->incremental_marking_job()) {

    // The task will start incremental marking (if needed not already started)
    // and advance marking if incremental marking is active.
    job->ScheduleTask();
    }
    }
    void Heap::NotifyInputHandlingEnded() {
    input_handling_state_.NotifyEnded(this);
    if (IsLoading()) {
    // loading state is more aggressive than input state.
    return;
    }
    RecomputeLimitsAfterInputHandlingIfNeeded();
    if (auto* job = incremental_marking()->incremental_marking_job()) {

    // The task will start incremental marking (if needed not already started)
    // and advance marking if incremental marking is active.
    job->ScheduleTask();
    }
    }
    void Heap::GCHintState::NotifyEnded(Heap* heap) {
    start_time_ms_.store(kInactive, std::memory_order_relaxed);
    TRACE_EVENT_END(TRACE_DISABLED_BY_DEFAULT("v8.gc"), track_);
    }

    ```

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benoit Lize
    • Dominik Inführ
    • Thiabaud Engelbrecht
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
    Gerrit-Change-Number: 7201825
    Gerrit-PatchSet: 7
    Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-CC: Benoit Lize <li...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Attention: Benoit Lize <li...@chromium.org>
    Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Dec 2025 17:54:12 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Thiabaud Engelbrecht (Gerrit)

    unread,
    Dec 9, 2025, 2:51:17 PM12/9/25
    to Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, Etienne Pierre-Doray, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Etienne Pierre-Doray

    Thiabaud Engelbrecht added 4 comments

    File include/v8-isolate.h
    Line 1550, Patchset 7:
    Etienne Pierre-Doray . resolved

    Let's add documentation on this method.

    Thiabaud Engelbrecht

    Done

    File src/heap/heap.cc
    Line 7879, Patchset 7: if (!IsLoading() && !IsInputHandling()) {
    Etienne Pierre-Doray . resolved

    I think we should do this even if IsInputHandling() == true.
    `IsLoading()` should always be true.
    So RecomputeLimitsAfterLoadingIfNeeded() can be called unconditionally.

    Thiabaud Engelbrecht

    Done

    Line 7890, Patchset 7: if (!IsLoading() && !IsInputHandling()) {
    Etienne Pierre-Doray . resolved

    I think just `IsLoading()` is sufficient, `!IsInputHandling()` should always be true here.

    Thiabaud Engelbrecht

    Done

    Line 7905, Patchset 7:void Heap::NotifyLoadingEnded() { loading_state_.NotifyEnded(this); }
    Etienne Pierre-Doray . resolved

    I don't think we gain in code reuse going through `callback_`. How about:

    ```
    void Heap::NotifyLoadingEnded() {
    loading_state_.NotifyEnded(this);
    RecomputeLimitsAfterLoadingIfNeeded();
    if (auto* job = incremental_marking()->incremental_marking_job()) {
    // The task will start incremental marking (if needed not already started)
    // and advance marking if incremental marking is active.
    job->ScheduleTask();
    }
    }
    void Heap::NotifyInputHandlingEnded() {
    input_handling_state_.NotifyEnded(this);
    if (IsLoading()) {
    // loading state is more aggressive than input state.
    return;
    }
    RecomputeLimitsAfterInputHandlingIfNeeded();
    if (auto* job = incremental_marking()->incremental_marking_job()) {
    // The task will start incremental marking (if needed not already started)
    // and advance marking if incremental marking is active.
    job->ScheduleTask();
    }
    }
    void Heap::GCHintState::NotifyEnded(Heap* heap) {
    start_time_ms_.store(kInactive, std::memory_order_relaxed);
    TRACE_EVENT_END(TRACE_DISABLED_BY_DEFAULT("v8.gc"), track_);
    }

    ```

    Thiabaud Engelbrecht

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Etienne Pierre-Doray
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
    Gerrit-Change-Number: 7201825
    Gerrit-PatchSet: 8
    Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-CC: Benoit Lize <li...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Dec 2025 19:51:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Etienne Pierre-Doray <etie...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Etienne Pierre-Doray (Gerrit)

    unread,
    Dec 10, 2025, 1:26:02 PM12/10/25
    to Thiabaud Engelbrecht, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Thiabaud Engelbrecht

    Etienne Pierre-Doray voted and added 3 comments

    Votes added by Etienne Pierre-Doray

    Code-Review+1

    3 comments

    Patchset-level comments
    File-level comment, Patchset 8 (Latest):
    Etienne Pierre-Doray . resolved

    LGTM (please wait for dinfuehr review)

    Commit Message
    Line 7, Patchset 8 (Latest):Add input hint
    Etienne Pierre-Doray . unresolved

    Nit: add [heap] tag

    File src/heap/heap.cc
    Line 7893, Patchset 8 (Latest):void Heap::NotifyInputHandlingStarted() {
    input_handling_state_.NotifyStarted(this);
    }

    void Heap::NotifyInputHandlingEnded() {
    Etienne Pierre-Doray . unresolved

    Do you want to add a flag in v8 for this? I think here would be a good place to check the flag (or maybe in SetIsInputHandling()).

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Thiabaud Engelbrecht
    Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: v8/v8
      Gerrit-Branch: main
      Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
      Gerrit-Change-Number: 7201825
      Gerrit-PatchSet: 8
      Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
      Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
      Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
      Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
      Gerrit-CC: Benoit Lize <li...@chromium.org>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-CC: Hannes Payer <hpa...@chromium.org>
      Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
      Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
      Gerrit-Comment-Date: Wed, 10 Dec 2025 18:25:59 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Thiabaud Engelbrecht (Gerrit)

      unread,
      Dec 11, 2025, 10:35:00 AM12/11/25
      to Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
      Attention needed from Etienne Pierre-Doray

      Thiabaud Engelbrecht added 2 comments

      Commit Message
      Line 7, Patchset 8:Add input hint
      Etienne Pierre-Doray . resolved

      Nit: add [heap] tag

      Thiabaud Engelbrecht

      Done

      File src/heap/heap.cc
      Line 7893, Patchset 8:void Heap::NotifyInputHandlingStarted() {
      input_handling_state_.NotifyStarted(this);
      }

      void Heap::NotifyInputHandlingEnded() {
      Etienne Pierre-Doray . resolved

      Do you want to add a flag in v8 for this? I think here would be a good place to check the flag (or maybe in SetIsInputHandling()).

      Thiabaud Engelbrecht

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Etienne Pierre-Doray
      Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
        Gerrit-Change-Number: 7201825
        Gerrit-PatchSet: 10
        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-CC: Benoit Lize <li...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Comment-Date: Thu, 11 Dec 2025 15:34:57 +0000
        unsatisfied_requirement
        open
        diffy

        Benoit Lize (Gerrit)

        unread,
        Dec 11, 2025, 10:59:35 AM12/11/25
        to Thiabaud Engelbrecht, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Etienne Pierre-Doray and Thiabaud Engelbrecht

        Benoit Lize added 7 comments

        Patchset-level comments
        File-level comment, Patchset 10 (Latest):
        Benoit Lize . resolved

        Per offline conversation, looks good overall, can you add tests as well?

        File src/flags/flag-definitions.h
        Line 2574, Patchset 10 (Latest): "how much we are allowed to overshoot the heap limit by during "
        Benoit Lize . unresolved

        Need to state the unit here, MiB?

        File src/heap/heap.h
        Line 2639, Patchset 10 (Latest): // bool update_allocation_limits_after_loading_ = false;
        Benoit Lize . unresolved

        nit: remove

        Line 2619, Patchset 10 (Latest): const double kMaxTimeMs;
        Benoit Lize . unresolved

        nit: should not use this case if not constexpr.

        const double max_time_;

        Line 2617, Patchset 10 (Latest): std::atomic<double> start_time_ms_{kInactive};
        Benoit Lize . unresolved

        Use v8::base::TimeTicks and v8::base::TimeDelta here and below

        File src/heap/heap.cc
        Line 5693, Patchset 10 (Latest): DCHECK(fixed_margin <= 64);
        Benoit Lize . unresolved

        Why the DCHECK()?

        If you want to protect against very high values, perhaps std::clamp() instead?

        Line 5697, Patchset 10 (Latest):bool Heap::AllocationLimitOvershotByFixedMargin(
        Benoit Lize . unresolved

        Can the code be merged with the one above?

        In the case above the margin is a percentage, but it gets computed before applying the limits.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Etienne Pierre-Doray
        • Thiabaud Engelbrecht
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
        Gerrit-Change-Number: 7201825
        Gerrit-PatchSet: 10
        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-CC: Benoit Lize <li...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Comment-Date: Thu, 11 Dec 2025 15:59:29 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        open
        diffy

        Etienne Pierre-Doray (Gerrit)

        unread,
        Dec 11, 2025, 11:23:43 AM12/11/25
        to Thiabaud Engelbrecht, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Thiabaud Engelbrecht

        Etienne Pierre-Doray added 1 comment

        File src/heap/heap.cc
        Line 5697, Patchset 10 (Latest):bool Heap::AllocationLimitOvershotByFixedMargin(
        Benoit Lize . unresolved

        Can the code be merged with the one above?

        In the case above the margin is a percentage, but it gets computed before applying the limits.

        Etienne Pierre-Doray

        Come to think of it, we probably want to apply the "or half-way to the max heap" bit from above, or simply also call `|| AllocationLimitOvershotByLargeMargin()`
        +1 to merging if possible.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Thiabaud Engelbrecht
        Gerrit-Comment-Date: Thu, 11 Dec 2025 16:23:40 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Benoit Lize <li...@chromium.org>
        unsatisfied_requirement
        open
        diffy

        Thiabaud Engelbrecht (Gerrit)

        unread,
        Dec 12, 2025, 12:10:17 AM12/12/25
        to Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Benoit Lize and Etienne Pierre-Doray

        Thiabaud Engelbrecht added 5 comments

        File src/flags/flag-definitions.h
        Line 2574, Patchset 10: "how much we are allowed to overshoot the heap limit by during "
        Benoit Lize . resolved

        Need to state the unit here, MiB?

        Thiabaud Engelbrecht

        Done

        File src/heap/heap.h
        Line 2639, Patchset 10: // bool update_allocation_limits_after_loading_ = false;
        Benoit Lize . resolved

        nit: remove

        Thiabaud Engelbrecht

        Done

        Line 2619, Patchset 10: const double kMaxTimeMs;
        Benoit Lize . resolved

        nit: should not use this case if not constexpr.

        const double max_time_;

        Thiabaud Engelbrecht

        Done

        File src/heap/heap.cc
        Line 5693, Patchset 10: DCHECK(fixed_margin <= 64);
        Benoit Lize . resolved

        Why the DCHECK()?

        If you want to protect against very high values, perhaps std::clamp() instead?

        Thiabaud Engelbrecht

        Done

        Line 5697, Patchset 10:bool Heap::AllocationLimitOvershotByFixedMargin(
        Benoit Lize . resolved

        Can the code be merged with the one above?

        In the case above the margin is a percentage, but it gets computed before applying the limits.

        Etienne Pierre-Doray

        Come to think of it, we probably want to apply the "or half-way to the max heap" bit from above, or simply also call `|| AllocationLimitOvershotByLargeMargin()`
        +1 to merging if possible.

        Thiabaud Engelbrecht

        Didn't merge since it's only a few lines, but called the other function too.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Benoit Lize
        • Etienne Pierre-Doray
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
        Gerrit-Change-Number: 7201825
        Gerrit-PatchSet: 11
        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-CC: Benoit Lize <li...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Attention: Benoit Lize <li...@chromium.org>
        Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Comment-Date: Fri, 12 Dec 2025 05:10:15 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Benoit Lize <li...@chromium.org>
        Comment-In-Reply-To: Etienne Pierre-Doray <etie...@chromium.org>
        unsatisfied_requirement
        open
        diffy

        Dominik Inführ (Gerrit)

        unread,
        Dec 16, 2025, 9:59:25 AM12/16/25
        to Thiabaud Engelbrecht, Etienne Pierre-Doray, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Thiabaud Engelbrecht

        Dominik Inführ added 3 comments

        File src/heap/heap.h
        Line 2090, Patchset 11 (Latest): // Chrome.
        Dominik Inführ . unresolved

        Nit: Can we add the path + codesearch link here to the Chromium constant?

        File src/heap/heap.cc
        Line 1766, Patchset 11 (Latest): if ((collector == GarbageCollector::MARK_COMPACTOR)) {
        Dominik Inführ . unresolved

        Nit: ((double parens))

        Line 2025, Patchset 11 (Latest): RecomputeLimitsAfterLoadingIfNeeded();
        Dominik Inführ . unresolved

        We now have two methods here that conditionally update limits such that we do not finalize incremental marking immediately afterwards. What about simply doing that unconditionally simply because we never really want. E.g. a method RecomputeLimitsOnIncrementalMarkingStart(). That could maybe. simplify the use of the update_allocation_limits_after_ended_.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Thiabaud Engelbrecht
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
        Gerrit-Change-Number: 7201825
        Gerrit-PatchSet: 11
        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-CC: Benoit Lize <li...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Comment-Date: Tue, 16 Dec 2025 14:59:18 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        open
        diffy

        Etienne Pierre-Doray (Gerrit)

        unread,
        Dec 16, 2025, 11:31:45 AM12/16/25
        to Thiabaud Engelbrecht, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Thiabaud Engelbrecht

        Etienne Pierre-Doray added 1 comment

        File src/heap/heap.cc
        Line 2025, Patchset 11 (Latest): RecomputeLimitsAfterLoadingIfNeeded();
        Dominik Inführ . unresolved

        We now have two methods here that conditionally update limits such that we do not finalize incremental marking immediately afterwards. What about simply doing that unconditionally simply because we never really want. E.g. a method RecomputeLimitsOnIncrementalMarkingStart(). That could maybe. simplify the use of the update_allocation_limits_after_ended_.

        Etienne Pierre-Doray

        What about simply doing that unconditionally simply because we never really want.

        I think that's what I wanted to try here?
        https://chromium-review.googlesource.com/c/v8/v8/+/7004685/19/src/heap/heap.cc
        (in the scope of b/454925310)
        +1 for doing this, but this comes with a greater risk of "getting behind"

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Thiabaud Engelbrecht
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
        Gerrit-Change-Number: 7201825
        Gerrit-PatchSet: 10
        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-CC: Benoit Lize <li...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Comment-Date: Tue, 16 Dec 2025 16:31:40 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Dominik Inführ <dinf...@chromium.org>
        unsatisfied_requirement
        open
        diffy

        Dominik Inführ (Gerrit)

        unread,
        Dec 16, 2025, 11:45:00 AM12/16/25
        to Thiabaud Engelbrecht, Etienne Pierre-Doray, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Thiabaud Engelbrecht

        Dominik Inführ added 1 comment

        File src/heap/heap.cc
        Line 2765, Patchset 11 (Latest): SetOldGenerationAndGlobalAllocationLimit(
        Dominik Inführ . unresolved

        Could we be more uniform here with RecomputeLimitsAfterLoadingIfNeeded(). For example in that method we use `UpdateAllocationLimits` instead of `SetOldGenerationAndGlobalAllocationLimit`. Also we don't set those fields here (not sure whether necessary). We also use `OldGenerationSpaceAvailable()` there. Could we align all of that? It's quite tricky to understand/make sense of/remember all the possible subtle differences in the approaches here.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Thiabaud Engelbrecht
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
        Gerrit-Change-Number: 7201825
        Gerrit-PatchSet: 11
        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-CC: Benoit Lize <li...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Comment-Date: Tue, 16 Dec 2025 16:44:55 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        open
        diffy

        Dominik Inführ (Gerrit)

        unread,
        Dec 17, 2025, 9:51:41 AM12/17/25
        to Thiabaud Engelbrecht, Etienne Pierre-Doray, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Thiabaud Engelbrecht

        Dominik Inführ added 3 comments

        File src/heap/heap.h
        Line 2091, Patchset 11 (Latest): static const int kMaxInputHandlingTimeMs = 3000;
        Dominik Inführ . unresolved

        How often and long is the input mode active? With the current implementation couldn't we run into situations where we (through entering input mode constantly) never trigger a GC because we constantly recompute and increase limits in NotifyInputHandlingEnded() until we eventually fail to allocate?

        File src/heap/heap.cc
        Line 2765, Patchset 11 (Latest): SetOldGenerationAndGlobalAllocationLimit(
        Dominik Inführ . unresolved

        Could we be more uniform here with RecomputeLimitsAfterLoadingIfNeeded(). For example in that method we use `UpdateAllocationLimits` instead of `SetOldGenerationAndGlobalAllocationLimit`. Also we don't set those fields here (not sure whether necessary). We also use `OldGenerationSpaceAvailable()` there. Could we align all of that? It's quite tricky to understand/make sense of/remember all the possible subtle differences in the approaches here.

        Dominik Inführ

        I've talked to Omer and Michael about this. Maybe we can use this "reset limits" approach for loading as well, so that we unify both modes based on this approach. I will try to write a CL for this and report back.

        Line 5694, Patchset 11 (Latest): return 1024 * 1024 * fixed_margin;
        Dominik Inführ . unresolved

        Nit: Use MB here.

        Gerrit-Comment-Date: Wed, 17 Dec 2025 14:51:36 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Dominik Inführ <dinf...@chromium.org>
        unsatisfied_requirement
        open
        diffy

        Etienne Pierre-Doray (Gerrit)

        unread,
        Dec 17, 2025, 5:02:50 PM12/17/25
        to Thiabaud Engelbrecht, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Thiabaud Engelbrecht

        Etienne Pierre-Doray added 1 comment

        File src/heap/heap.cc
        Line 2765, Patchset 11 (Latest): SetOldGenerationAndGlobalAllocationLimit(
        Dominik Inführ . unresolved

        Could we be more uniform here with RecomputeLimitsAfterLoadingIfNeeded(). For example in that method we use `UpdateAllocationLimits` instead of `SetOldGenerationAndGlobalAllocationLimit`. Also we don't set those fields here (not sure whether necessary). We also use `OldGenerationSpaceAvailable()` there. Could we align all of that? It's quite tricky to understand/make sense of/remember all the possible subtle differences in the approaches here.

        Dominik Inführ

        I've talked to Omer and Michael about this. Maybe we can use this "reset limits" approach for loading as well, so that we unify both modes based on this approach. I will try to write a CL for this and report back.

        Etienne Pierre-Doray

        The motivation for the 2 RecomputeLimitsAfter* methods was to isolate behavior change to only input related signal (and leave loading untouched), and attempt to change the loading as a follow-up.
        Overall, I'm in favour of using this "reset limits" logic everywhere, but that means the experiment will have a scope a bit beyond input hint (with possibly effects that are hard to understand).

        Gerrit-Comment-Date: Wed, 17 Dec 2025 22:02:46 +0000
        unsatisfied_requirement
        open
        diffy

        Thiabaud Engelbrecht (Gerrit)

        unread,
        Dec 19, 2025, 12:01:48 PM12/19/25
        to Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Dominik Inführ and Etienne Pierre-Doray

        Thiabaud Engelbrecht added 5 comments

        File src/heap/heap.h
        Line 2617, Patchset 10: std::atomic<double> start_time_ms_{kInactive};
        Benoit Lize . resolved

        Use v8::base::TimeTicks and v8::base::TimeDelta here and below

        Thiabaud Engelbrecht

        Acknowledged. Will do in a follow-up CL.

        File src/heap/heap.cc
        Line 1766, Patchset 11: if ((collector == GarbageCollector::MARK_COMPACTOR)) {
        Dominik Inführ . resolved

        Nit: ((double parens))

        Thiabaud Engelbrecht

        Done

        Line 2025, Patchset 11: RecomputeLimitsAfterLoadingIfNeeded();
        Dominik Inführ . resolved

        We now have two methods here that conditionally update limits such that we do not finalize incremental marking immediately afterwards. What about simply doing that unconditionally simply because we never really want. E.g. a method RecomputeLimitsOnIncrementalMarkingStart(). That could maybe. simplify the use of the update_allocation_limits_after_ended_.

        Etienne Pierre-Doray

        What about simply doing that unconditionally simply because we never really want.

        I think that's what I wanted to try here?
        https://chromium-review.googlesource.com/c/v8/v8/+/7004685/19/src/heap/heap.cc
        (in the scope of b/454925310)
        +1 for doing this, but this comes with a greater risk of "getting behind"

        Thiabaud Engelbrecht

        Done

        Line 2765, Patchset 11: SetOldGenerationAndGlobalAllocationLimit(
        Dominik Inführ . resolved

        Could we be more uniform here with RecomputeLimitsAfterLoadingIfNeeded(). For example in that method we use `UpdateAllocationLimits` instead of `SetOldGenerationAndGlobalAllocationLimit`. Also we don't set those fields here (not sure whether necessary). We also use `OldGenerationSpaceAvailable()` there. Could we align all of that? It's quite tricky to understand/make sense of/remember all the possible subtle differences in the approaches here.

        Dominik Inführ

        I've talked to Omer and Michael about this. Maybe we can use this "reset limits" approach for loading as well, so that we unify both modes based on this approach. I will try to write a CL for this and report back.

        Etienne Pierre-Doray

        The motivation for the 2 RecomputeLimitsAfter* methods was to isolate behavior change to only input related signal (and leave loading untouched), and attempt to change the loading as a follow-up.
        Overall, I'm in favour of using this "reset limits" logic everywhere, but that means the experiment will have a scope a bit beyond input hint (with possibly effects that are hard to understand).

        Thiabaud Engelbrecht

        Acknowledged

        Line 5694, Patchset 11: return 1024 * 1024 * fixed_margin;
        Dominik Inführ . resolved

        Nit: Use MB here.

        Thiabaud Engelbrecht

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Dominik Inführ
        • Etienne Pierre-Doray
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
        Gerrit-Change-Number: 7201825
        Gerrit-PatchSet: 14
        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-CC: Benoit Lize <li...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Comment-Date: Fri, 19 Dec 2025 17:01:36 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Benoit Lize <li...@chromium.org>
        Comment-In-Reply-To: Etienne Pierre-Doray <etie...@chromium.org>
        Comment-In-Reply-To: Dominik Inführ <dinf...@chromium.org>
        unsatisfied_requirement
        open
        diffy

        Dominik Inführ (Gerrit)

        unread,
        Dec 19, 2025, 2:21:01 PM12/19/25
        to Thiabaud Engelbrecht, Etienne Pierre-Doray, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Etienne Pierre-Doray and Thiabaud Engelbrecht

        Dominik Inführ added 1 comment

        File src/heap/heap.cc
        Line 2773, Patchset 14 (Latest):void Heap::RecomputeLimitsAfterInputHandlingIfNeeded() {
        Dominik Inführ . unresolved

        Let's just drop this method and use `EnsureAllocationLimitAboveCurrentSize()` directly. We want to get rid of the corresponding method for loading as well.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Etienne Pierre-Doray
        • Thiabaud Engelbrecht
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
        Gerrit-Change-Number: 7201825
        Gerrit-PatchSet: 14
        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-CC: Benoit Lize <li...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Comment-Date: Fri, 19 Dec 2025 19:20:56 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        open
        diffy

        Omer Katz (Gerrit)

        unread,
        Dec 22, 2025, 4:50:22 PM12/22/25
        to Thiabaud Engelbrecht, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Etienne Pierre-Doray and Thiabaud Engelbrecht

        Omer Katz added 5 comments

        Patchset-level comments
        File-level comment, Patchset 14 (Latest):
        Omer Katz . resolved

        This is already looking good.
        Added a few comments + Please address Dominik's open comments.

        File src/heap/heap.cc
        Line 5678, Patchset 14 (Latest):uint64_t Heap::GetFixedMarginForInputHandlingBytes() const {
        Omer Katz . unresolved

        Let's make this a free standing method in an anonymous namespace. I don't see a reason for it to be a part of `Heap`.

        Line 5687, Patchset 14 (Latest): DCHECK(v8_flags.optimize_for_input_handling);
        Omer Katz . unresolved

        I think if this method assumes it's only ever used for input handling, we don't need to get the `overshoot_margin` as a parameter. We can just hardcode a call to `GetFixedMarginForInputHandlingBytes()`.
        If we want this method to be more generic and accept various margins, I think we should the DCHECK here. I'm leaning towards this option.

        Line 5713, Patchset 14 (Latest): return IsInputHandling() && !(AllocationLimitOvershotByFixedMargin(
        Omer Katz . unresolved

        If `optimize_for_input_handling` is false, is there a reason to even initialize `input_handling_state_`? Practically, if never initialize `input_handling_state_` and if the flag is false, `IsInputHandling()` will subsume the flag check above.

        Line 7920, Patchset 14 (Latest): input_handling_state_.NotifyEnded(this);
        Omer Katz . unresolved

        nit: Can we move this to the end of method just to align with `NotifyLoadingEnded`?

        Gerrit-CC: Omer Katz <omer...@chromium.org>
        Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Comment-Date: Mon, 22 Dec 2025 21:50:16 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        open
        diffy

        Thiabaud Engelbrecht (Gerrit)

        unread,
        Dec 22, 2025, 11:48:55 PM12/22/25
        to Omer Katz, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Dominik Inführ, Etienne Pierre-Doray and Omer Katz

        Thiabaud Engelbrecht added 7 comments

        File src/heap/heap.h
        Line 2091, Patchset 11: static const int kMaxInputHandlingTimeMs = 3000;
        Dominik Inführ . unresolved

        How often and long is the input mode active? With the current implementation couldn't we run into situations where we (through entering input mode constantly) never trigger a GC because we constantly recompute and increase limits in NotifyInputHandlingEnded() until we eventually fail to allocate?

        Thiabaud Engelbrecht

        Should be active whenever the user is interacting with Chrome. Which shouldn't be too often/too long (as seen by the results of the experiment we ran already).

        I believe the check with |AllocationLimitOvershotByLargeMargin()| below should avoid this case though (please correct me if I'm wrong here).

        Line 2090, Patchset 11: // Chrome.
        Dominik Inführ . resolved

        Nit: Can we add the path + codesearch link here to the Chromium constant?

        Thiabaud Engelbrecht

        Acknowledged

        File src/heap/heap.cc
        Line 2773, Patchset 14:void Heap::RecomputeLimitsAfterInputHandlingIfNeeded() {
        Dominik Inführ . unresolved

        Let's just drop this method and use `EnsureAllocationLimitAboveCurrentSize()` directly. We want to get rid of the corresponding method for loading as well.

        Thiabaud Engelbrecht

        I'd like to keep the DCHECK I have here, and remove both methods at the same later on? That way I can ensure that we only call this in the experiment group for now.

        Line 5678, Patchset 14:uint64_t Heap::GetFixedMarginForInputHandlingBytes() const {
        Omer Katz . resolved

        Let's make this a free standing method in an anonymous namespace. I don't see a reason for it to be a part of `Heap`.

        Thiabaud Engelbrecht

        Done

        Line 5687, Patchset 14: DCHECK(v8_flags.optimize_for_input_handling);
        Omer Katz . resolved

        I think if this method assumes it's only ever used for input handling, we don't need to get the `overshoot_margin` as a parameter. We can just hardcode a call to `GetFixedMarginForInputHandlingBytes()`.
        If we want this method to be more generic and accept various margins, I think we should the DCHECK here. I'm leaning towards this option.

        Thiabaud Engelbrecht

        Acknowledged

        Line 5713, Patchset 14: return IsInputHandling() && !(AllocationLimitOvershotByFixedMargin(
        Omer Katz . unresolved

        If `optimize_for_input_handling` is false, is there a reason to even initialize `input_handling_state_`? Practically, if never initialize `input_handling_state_` and if the flag is false, `IsInputHandling()` will subsume the flag check above.

        Thiabaud Engelbrecht

        I'd like to add a follow-up CL with metrics. As part of that, I'd like to know if we were in the input state or not, so I've made sure we track that properly in this CL,regardless of if the feature is enabled or not.

        Line 7920, Patchset 14: input_handling_state_.NotifyEnded(this);
        Omer Katz . resolved

        nit: Can we move this to the end of method just to align with `NotifyLoadingEnded`?

        Thiabaud Engelbrecht

        Done (moved loading instead because we have the early return here)

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Dominik Inführ
        • Etienne Pierre-Doray
        • Omer Katz
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
        Gerrit-Change-Number: 7201825
        Gerrit-PatchSet: 15
        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-CC: Benoit Lize <li...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
        Gerrit-CC: Omer Katz <omer...@chromium.org>
        Gerrit-Attention: Omer Katz <omer...@chromium.org>
        Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Comment-Date: Tue, 23 Dec 2025 04:48:51 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Omer Katz <omer...@chromium.org>
        Comment-In-Reply-To: Dominik Inführ <dinf...@chromium.org>
        unsatisfied_requirement
        open
        diffy

        Omer Katz (Gerrit)

        unread,
        Dec 23, 2025, 4:27:09 AM12/23/25
        to Thiabaud Engelbrecht, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Dominik Inführ, Etienne Pierre-Doray and Thiabaud Engelbrecht

        Omer Katz added 4 comments

        File src/heap/heap.h
        Line 2091, Patchset 11: static const int kMaxInputHandlingTimeMs = 3000;
        Dominik Inführ . unresolved

        How often and long is the input mode active? With the current implementation couldn't we run into situations where we (through entering input mode constantly) never trigger a GC because we constantly recompute and increase limits in NotifyInputHandlingEnded() until we eventually fail to allocate?

        Thiabaud Engelbrecht

        Should be active whenever the user is interacting with Chrome. Which shouldn't be too often/too long (as seen by the results of the experiment we ran already).

        I believe the check with |AllocationLimitOvershotByLargeMargin()| below should avoid this case though (please correct me if I'm wrong here).

        Omer Katz

        I think Dominik's concern was that if you exit and enter input mode repetitively, each time you exit you bump the limits. Potentially that means you may never hit the overshot by large margin case.

        I initially thought that scheduling the incremental marking job is what protects us from this. However if the renderer is busy handling input, we won't get that task either. Likely there is a way to misuse input mode to continuously grow the limits.

        I think this problem also exists with the current loading mode if it's misused, but I suspect the intended usage of input mode makes it more likely to accidentally be misused. E.g. if a user keeps scrolling the page up and down, will we be forever in input mode? My understanding is that the answer is yes.

        This needs a mitigation, but for the sake of progress we can also add a TODO for now, land without a mitigation, and add one in a followup (before we start experimenting with it imo).

        File src/heap/heap.cc
        Line 2773, Patchset 14:void Heap::RecomputeLimitsAfterInputHandlingIfNeeded() {
        Dominik Inführ . resolved

        Let's just drop this method and use `EnsureAllocationLimitAboveCurrentSize()` directly. We want to get rid of the corresponding method for loading as well.

        Thiabaud Engelbrecht

        I'd like to keep the DCHECK I have here, and remove both methods at the same later on? That way I can ensure that we only call this in the experiment group for now.

        Omer Katz

        Acknowledged

        Line 5687, Patchset 14: DCHECK(v8_flags.optimize_for_input_handling);
        Omer Katz . unresolved

        I think if this method assumes it's only ever used for input handling, we don't need to get the `overshoot_margin` as a parameter. We can just hardcode a call to `GetFixedMarginForInputHandlingBytes()`.
        If we want this method to be more generic and accept various margins, I think we should the DCHECK here. I'm leaning towards this option.

        Thiabaud Engelbrecht

        Acknowledged

        Omer Katz

        Can we already update this method to either be input mode specific or generic?

        Line 5713, Patchset 14: return IsInputHandling() && !(AllocationLimitOvershotByFixedMargin(
        Omer Katz . unresolved

        If `optimize_for_input_handling` is false, is there a reason to even initialize `input_handling_state_`? Practically, if never initialize `input_handling_state_` and if the flag is false, `IsInputHandling()` will subsume the flag check above.

        Thiabaud Engelbrecht

        I'd like to add a follow-up CL with metrics. As part of that, I'd like to know if we were in the input state or not, so I've made sure we track that properly in this CL,regardless of if the feature is enabled or not.

        Omer Katz

        I see. Keep in mind that means that if there are any regressions coming in from this CL, we can't argue it's all behind a flag.

        Can you add a TODO to consider not entering input mode at all when the flag is off?
        That way if the metrics CL never lands, we have documentation that we can simplify the code here.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Dominik Inführ
        • Etienne Pierre-Doray
        • Thiabaud Engelbrecht
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
        Gerrit-Change-Number: 7201825
        Gerrit-PatchSet: 15
        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-CC: Benoit Lize <li...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
        Gerrit-CC: Omer Katz <omer...@chromium.org>
        Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Comment-Date: Tue, 23 Dec 2025 09:27:05 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Thiabaud Engelbrecht <thia...@google.com>
        unsatisfied_requirement
        open
        diffy

        Omer Katz (Gerrit)

        unread,
        Dec 23, 2025, 4:27:55 AM12/23/25
        to Thiabaud Engelbrecht, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Dominik Inführ, Etienne Pierre-Doray and Thiabaud Engelbrecht

        Omer Katz added 1 comment

        Patchset-level comments
        File-level comment, Patchset 15 (Latest):
        Omer Katz . resolved

        I think one last revision should suffice and then we can land. Thanks

        Gerrit-Comment-Date: Tue, 23 Dec 2025 09:27:51 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        open
        diffy

        Thiabaud Engelbrecht (Gerrit)

        unread,
        Dec 23, 2025, 9:39:18 AM12/23/25
        to Omer Katz, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Dominik Inführ, Etienne Pierre-Doray and Omer Katz

        Thiabaud Engelbrecht added 3 comments

        File src/heap/heap.h
        Line 2091, Patchset 11: static const int kMaxInputHandlingTimeMs = 3000;
        Dominik Inführ . resolved

        How often and long is the input mode active? With the current implementation couldn't we run into situations where we (through entering input mode constantly) never trigger a GC because we constantly recompute and increase limits in NotifyInputHandlingEnded() until we eventually fail to allocate?

        Thiabaud Engelbrecht

        Should be active whenever the user is interacting with Chrome. Which shouldn't be too often/too long (as seen by the results of the experiment we ran already).

        I believe the check with |AllocationLimitOvershotByLargeMargin()| below should avoid this case though (please correct me if I'm wrong here).

        Omer Katz

        I think Dominik's concern was that if you exit and enter input mode repetitively, each time you exit you bump the limits. Potentially that means you may never hit the overshot by large margin case.

        I initially thought that scheduling the incremental marking job is what protects us from this. However if the renderer is busy handling input, we won't get that task either. Likely there is a way to misuse input mode to continuously grow the limits.

        I think this problem also exists with the current loading mode if it's misused, but I suspect the intended usage of input mode makes it more likely to accidentally be misused. E.g. if a user keeps scrolling the page up and down, will we be forever in input mode? My understanding is that the answer is yes.

        This needs a mitigation, but for the sake of progress we can also add a TODO for now, land without a mitigation, and add one in a followup (before we start experimenting with it imo).

        Thiabaud Engelbrecht

        Done

        File src/heap/heap.cc
        Line 5687, Patchset 14: DCHECK(v8_flags.optimize_for_input_handling);
        Omer Katz . resolved

        I think if this method assumes it's only ever used for input handling, we don't need to get the `overshoot_margin` as a parameter. We can just hardcode a call to `GetFixedMarginForInputHandlingBytes()`.


        If we want this method to be more generic and accept various margins, I think we should the DCHECK here. I'm leaning towards this option.

        Thiabaud Engelbrecht

        Acknowledged

        Omer Katz

        Can we already update this method to either be input mode specific or generic?

        Thiabaud Engelbrecht

        Done

        Line 5713, Patchset 14: return IsInputHandling() && !(AllocationLimitOvershotByFixedMargin(
        Omer Katz . resolved

        If `optimize_for_input_handling` is false, is there a reason to even initialize `input_handling_state_`? Practically, if never initialize `input_handling_state_` and if the flag is false, `IsInputHandling()` will subsume the flag check above.

        Thiabaud Engelbrecht

        I'd like to add a follow-up CL with metrics. As part of that, I'd like to know if we were in the input state or not, so I've made sure we track that properly in this CL,regardless of if the feature is enabled or not.

        Omer Katz

        I see. Keep in mind that means that if there are any regressions coming in from this CL, we can't argue it's all behind a flag.

        Can you add a TODO to consider not entering input mode at all when the flag is off?
        That way if the metrics CL never lands, we have documentation that we can simplify the code here.

        Thiabaud Engelbrecht

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Dominik Inführ
        • Etienne Pierre-Doray
        • Omer Katz
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
        Gerrit-Change-Number: 7201825
        Gerrit-PatchSet: 16
        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
        Gerrit-CC: Benoit Lize <li...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
        Gerrit-CC: Omer Katz <omer...@chromium.org>
        Gerrit-Attention: Omer Katz <omer...@chromium.org>
        Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Comment-Date: Tue, 23 Dec 2025 14:39:14 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        open
        diffy

        Omer Katz (Gerrit)

        unread,
        Dec 23, 2025, 9:40:52 AM12/23/25
        to Thiabaud Engelbrecht, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Dominik Inführ, Etienne Pierre-Doray and Thiabaud Engelbrecht

        Omer Katz voted and added 2 comments

        Votes added by Omer Katz

        Code-Review+1

        2 comments

        Patchset-level comments
        File-level comment, Patchset 16 (Latest):
        Omer Katz . resolved

        lgtm. Thanks!

        File src/heap/heap.cc
        Line 5711, Patchset 16 (Latest): // TODO(thiabaud): Entering and leaving input mode repeatedly may cause the
        Omer Katz . unresolved

        nit: Let's use the bug number for the TODOs.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Dominik Inführ
        • Etienne Pierre-Doray
        • Thiabaud Engelbrecht
        Submit Requirements:
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: v8/v8
          Gerrit-Branch: main
          Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
          Gerrit-Change-Number: 7201825
          Gerrit-PatchSet: 16
          Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
          Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
          Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
          Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
          Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
          Gerrit-CC: Benoit Lize <li...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-CC: Hannes Payer <hpa...@chromium.org>
          Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
          Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
          Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
          Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
          Gerrit-Comment-Date: Tue, 23 Dec 2025 14:40:48 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Thiabaud Engelbrecht (Gerrit)

          unread,
          Dec 23, 2025, 9:55:07 AM12/23/25
          to Omer Katz, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
          Attention needed from Dominik Inführ, Etienne Pierre-Doray and Omer Katz

          Thiabaud Engelbrecht added 1 comment

          File src/heap/heap.cc
          Line 5711, Patchset 16: // TODO(thiabaud): Entering and leaving input mode repeatedly may cause the
          Omer Katz . resolved

          nit: Let's use the bug number for the TODOs.

          Thiabaud Engelbrecht

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Dominik Inführ
          • Etienne Pierre-Doray
          • Omer Katz
          Submit Requirements:
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: v8/v8
            Gerrit-Branch: main
            Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
            Gerrit-Change-Number: 7201825
            Gerrit-PatchSet: 16
            Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
            Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
            Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
            Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
            Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
            Gerrit-CC: Benoit Lize <li...@chromium.org>
            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
            Gerrit-CC: Hannes Payer <hpa...@chromium.org>
            Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
            Gerrit-Attention: Omer Katz <omer...@chromium.org>
            Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
            Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
            Gerrit-Comment-Date: Tue, 23 Dec 2025 14:55:05 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Omer Katz <omer...@chromium.org>
            unsatisfied_requirement
            open
            diffy

            Omer Katz (Gerrit)

            unread,
            Dec 23, 2025, 9:56:20 AM12/23/25
            to Thiabaud Engelbrecht, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
            Attention needed from Dominik Inführ, Etienne Pierre-Doray and Thiabaud Engelbrecht

            Omer Katz voted and added 1 comment

            Votes added by Omer Katz

            Code-Review+1

            1 comment

            Patchset-level comments
            File-level comment, Patchset 17 (Latest):
            Omer Katz . resolved

            still lgtm

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Dominik Inführ
            • Etienne Pierre-Doray
            • Thiabaud Engelbrecht
            Submit Requirements:
              • requirement is not satisfiedCode-Owners
              • requirement is not satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: v8/v8
              Gerrit-Branch: main
              Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
              Gerrit-Change-Number: 7201825
              Gerrit-PatchSet: 17
              Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
              Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
              Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
              Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
              Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
              Gerrit-CC: Benoit Lize <li...@chromium.org>
              Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
              Gerrit-CC: Hannes Payer <hpa...@chromium.org>
              Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
              Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
              Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
              Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
              Gerrit-Comment-Date: Tue, 23 Dec 2025 14:56:15 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              unsatisfied_requirement
              satisfied_requirement
              open
              diffy

              Etienne Pierre-Doray (Gerrit)

              unread,
              Dec 23, 2025, 10:29:21 AM12/23/25
              to Thiabaud Engelbrecht, Omer Katz, Dominik Inführ, AyeAye, Code Review Nudger, Michael Lippautz, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
              Attention needed from Dominik Inführ and Thiabaud Engelbrecht

              Etienne Pierre-Doray voted and added 2 comments

              Votes added by Etienne Pierre-Doray

              Code-Review+1

              2 comments

              Patchset-level comments
              Etienne Pierre-Doray . resolved

              LGTM

              File src/heap/heap.h
              Line 2091, Patchset 11: static const int kMaxInputHandlingTimeMs = 3000;
              Dominik Inführ . resolved

              How often and long is the input mode active? With the current implementation couldn't we run into situations where we (through entering input mode constantly) never trigger a GC because we constantly recompute and increase limits in NotifyInputHandlingEnded() until we eventually fail to allocate?

              Thiabaud Engelbrecht

              Should be active whenever the user is interacting with Chrome. Which shouldn't be too often/too long (as seen by the results of the experiment we ran already).

              I believe the check with |AllocationLimitOvershotByLargeMargin()| below should avoid this case though (please correct me if I'm wrong here).

              Omer Katz

              I think Dominik's concern was that if you exit and enter input mode repetitively, each time you exit you bump the limits. Potentially that means you may never hit the overshot by large margin case.

              I initially thought that scheduling the incremental marking job is what protects us from this. However if the renderer is busy handling input, we won't get that task either. Likely there is a way to misuse input mode to continuously grow the limits.

              I think this problem also exists with the current loading mode if it's misused, but I suspect the intended usage of input mode makes it more likely to accidentally be misused. E.g. if a user keeps scrolling the page up and down, will we be forever in input mode? My understanding is that the answer is yes.

              This needs a mitigation, but for the sake of progress we can also add a TODO for now, land without a mitigation, and add one in a followup (before we start experimenting with it imo).

              Thiabaud Engelbrecht

              Done

              Etienne Pierre-Doray

              I initially thought that scheduling the incremental marking job is what protects us from this. However if the renderer is busy handling input, we won't get that task either.

              1- EnsureAllocationLimitAboveCurrentSize is called in Heap::StartIncrementalMarking(), at which point we already started GC (we won't change the limit until we finish it)
              2- RecomputeLimitsAfterInputHandlingIfNeeded called in NotifyInputHandlingEnded() only schedules incremental GC, so this is where we can potentially continuously grow.
              Maybe an easy mitigation is to call StartIncrementalMarkingIfAllocationLimitIsReached() synchronously in RecomputeLimitsAfterInputHandlingIfNeeded() instead (possibly to do as a follow-up)

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Dominik Inführ
              • Thiabaud Engelbrecht
              Submit Requirements:
                • requirement is not satisfiedCode-Owners
                • requirement satisfiedCode-Review
                • requirement is not satisfiedNo-Unresolved-Comments
                • requirement satisfiedReview-Enforcement
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: comment
                Gerrit-Project: v8/v8
                Gerrit-Branch: main
                Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                Gerrit-Change-Number: 7201825
                Gerrit-PatchSet: 17
                Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-CC: Benoit Lize <li...@chromium.org>
                Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                Gerrit-CC: Michael Lippautz <mlip...@chromium.org>
                Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
                Gerrit-Comment-Date: Tue, 23 Dec 2025 15:29:17 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                unsatisfied_requirement
                satisfied_requirement
                open
                diffy

                Omer Katz (Gerrit)

                unread,
                Dec 23, 2025, 10:38:40 AM12/23/25
                to Thiabaud Engelbrecht, Michael Lippautz, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                Attention needed from Dominik Inführ and Michael Lippautz

                Omer Katz added 1 comment

                File src/heap/heap.h
                Line 2091, Patchset 11: static const int kMaxInputHandlingTimeMs = 3000;
                Dominik Inführ . resolved

                How often and long is the input mode active? With the current implementation couldn't we run into situations where we (through entering input mode constantly) never trigger a GC because we constantly recompute and increase limits in NotifyInputHandlingEnded() until we eventually fail to allocate?

                Thiabaud Engelbrecht

                Should be active whenever the user is interacting with Chrome. Which shouldn't be too often/too long (as seen by the results of the experiment we ran already).

                I believe the check with |AllocationLimitOvershotByLargeMargin()| below should avoid this case though (please correct me if I'm wrong here).

                Omer Katz

                I think Dominik's concern was that if you exit and enter input mode repetitively, each time you exit you bump the limits. Potentially that means you may never hit the overshot by large margin case.

                I initially thought that scheduling the incremental marking job is what protects us from this. However if the renderer is busy handling input, we won't get that task either. Likely there is a way to misuse input mode to continuously grow the limits.

                I think this problem also exists with the current loading mode if it's misused, but I suspect the intended usage of input mode makes it more likely to accidentally be misused. E.g. if a user keeps scrolling the page up and down, will we be forever in input mode? My understanding is that the answer is yes.

                This needs a mitigation, but for the sake of progress we can also add a TODO for now, land without a mitigation, and add one in a followup (before we start experimenting with it imo).

                Thiabaud Engelbrecht

                Done

                Etienne Pierre-Doray

                I initially thought that scheduling the incremental marking job is what protects us from this. However if the renderer is busy handling input, we won't get that task either.

                1- EnsureAllocationLimitAboveCurrentSize is called in Heap::StartIncrementalMarking(), at which point we already started GC (we won't change the limit until we finish it)
                2- RecomputeLimitsAfterInputHandlingIfNeeded called in NotifyInputHandlingEnded() only schedules incremental GC, so this is where we can potentially continuously grow.
                Maybe an easy mitigation is to call StartIncrementalMarkingIfAllocationLimitIsReached() synchronously in RecomputeLimitsAfterInputHandlingIfNeeded() instead (possibly to do as a follow-up)

                Omer Katz

                1- EnsureAllocationLimitAboveCurrentSize is called in Heap::StartIncrementalMarking(), at which point we already started GC (we won't change the limit until we finish it)

                It's also called when leaving input mode (and I think it should be called there). In that case,if the limit was exceeded only by a small margin (meaning we haven't started incremental marking yet), we will update the limits and schedule a task to start incremental marking. If that task doesn't get to run, we can do this over and over again to slowly increase the limits and never actually get a GC.
                I believe the existing loading mode is also affected by this, but likely harder to trigger than with input mode.

                2- RecomputeLimitsAfterInputHandlingIfNeeded called in NotifyInputHandlingEnded() only schedules incremental GC, so this is where we can potentially continuously grow.

                Agreed.

                Maybe an easy mitigation is to call StartIncrementalMarkingIfAllocationLimitIsReached() synchronously in RecomputeLimitsAfterInputHandlingIfNeeded() instead

                We generally prefer to schedule a job and wait for it. I think we'll need another threshold where we skip the job and start incremental marking immediately (similar to the regular hard limit). However, that means we need to remember the original limit since the last GC or something like that. We'd have to think this through.

                (possibly to do as a follow-up)

                Definitely a follow up. Let's revisit and address this in January.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Dominik Inführ
                • Michael Lippautz
                Submit Requirements:
                • requirement is not satisfiedCode-Owners
                • requirement satisfiedCode-Review
                • requirement is not satisfiedNo-Unresolved-Comments
                • requirement satisfiedReview-Enforcement
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: comment
                Gerrit-Project: v8/v8
                Gerrit-Branch: main
                Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                Gerrit-Change-Number: 7201825
                Gerrit-PatchSet: 17
                Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-CC: Benoit Lize <li...@chromium.org>
                Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
                Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
                Gerrit-Comment-Date: Tue, 23 Dec 2025 15:38:34 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Thiabaud Engelbrecht <thia...@google.com>
                Comment-In-Reply-To: Omer Katz <omer...@chromium.org>
                unsatisfied_requirement
                satisfied_requirement
                open
                diffy

                Michael Lippautz (Gerrit)

                unread,
                Jan 7, 2026, 8:47:41 AM (2 days ago) Jan 7
                to Thiabaud Engelbrecht, Etienne Pierre-Doray, Omer Katz, Dominik Inführ, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                Attention needed from Thiabaud Engelbrecht

                Michael Lippautz added 1 comment

                File include/v8-isolate.h
                Line 1557, Patchset 17 (Latest): * which simply updates the timestamp when V8 considers the input handling
                Michael Lippautz . unresolved

                Doesn't this mean that repeatedly calling `SetIsInputHandling(true)` allows for bypassing the max time for a single input handler?

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Thiabaud Engelbrecht
                Submit Requirements:
                • requirement is not satisfiedCode-Owners
                • requirement satisfiedCode-Review
                • requirement is not satisfiedNo-Unresolved-Comments
                • requirement satisfiedReview-Enforcement
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: comment
                Gerrit-Project: v8/v8
                Gerrit-Branch: main
                Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                Gerrit-Change-Number: 7201825
                Gerrit-PatchSet: 17
                Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-CC: Benoit Lize <li...@chromium.org>
                Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-Comment-Date: Wed, 07 Jan 2026 13:47:36 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                unsatisfied_requirement
                satisfied_requirement
                open
                diffy

                Thiabaud Engelbrecht (Gerrit)

                unread,
                Jan 7, 2026, 9:04:17 AM (2 days ago) Jan 7
                to Michael Lippautz, Etienne Pierre-Doray, Omer Katz, Dominik Inführ, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                Attention needed from Michael Lippautz

                Thiabaud Engelbrecht added 1 comment

                File include/v8-isolate.h
                Line 1557, Patchset 17 (Latest): * which simply updates the timestamp when V8 considers the input handling
                Michael Lippautz . unresolved

                Doesn't this mean that repeatedly calling `SetIsInputHandling(true)` allows for bypassing the max time for a single input handler?

                Thiabaud Engelbrecht

                Yes, would you prefer for this to be a no-op?

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Michael Lippautz
                Submit Requirements:
                • requirement is not satisfiedCode-Owners
                • requirement satisfiedCode-Review
                • requirement is not satisfiedNo-Unresolved-Comments
                • requirement satisfiedReview-Enforcement
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: comment
                Gerrit-Project: v8/v8
                Gerrit-Branch: main
                Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                Gerrit-Change-Number: 7201825
                Gerrit-PatchSet: 17
                Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-CC: Benoit Lize <li...@chromium.org>
                Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
                Gerrit-Comment-Date: Wed, 07 Jan 2026 14:04:11 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
                unsatisfied_requirement
                satisfied_requirement
                open
                diffy

                Michael Lippautz (Gerrit)

                unread,
                Jan 7, 2026, 9:05:46 AM (2 days ago) Jan 7
                to Thiabaud Engelbrecht, Etienne Pierre-Doray, Omer Katz, Dominik Inführ, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                Attention needed from Thiabaud Engelbrecht

                Michael Lippautz added 1 comment

                File include/v8-isolate.h
                Line 1557, Patchset 17 (Latest): * which simply updates the timestamp when V8 considers the input handling
                Michael Lippautz . unresolved

                Doesn't this mean that repeatedly calling `SetIsInputHandling(true)` allows for bypassing the max time for a single input handler?

                Thiabaud Engelbrecht

                Yes, would you prefer for this to be a no-op?

                Michael Lippautz

                Yes : )

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Thiabaud Engelbrecht
                Submit Requirements:
                • requirement is not satisfiedCode-Owners
                • requirement satisfiedCode-Review
                • requirement is not satisfiedNo-Unresolved-Comments
                • requirement satisfiedReview-Enforcement
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: comment
                Gerrit-Project: v8/v8
                Gerrit-Branch: main
                Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                Gerrit-Change-Number: 7201825
                Gerrit-PatchSet: 17
                Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-CC: Benoit Lize <li...@chromium.org>
                Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
                Gerrit-Comment-Date: Wed, 07 Jan 2026 14:05:41 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Thiabaud Engelbrecht <thia...@google.com>
                Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
                unsatisfied_requirement
                satisfied_requirement
                open
                diffy

                Dominik Inführ (Gerrit)

                unread,
                Jan 7, 2026, 9:41:55 AM (2 days ago) Jan 7
                to Thiabaud Engelbrecht, Michael Lippautz, Etienne Pierre-Doray, Omer Katz, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                Attention needed from Thiabaud Engelbrecht

                Dominik Inführ added 1 comment

                File src/heap/heap.cc
                Line 7934, Patchset 17 (Latest): RecomputeLimitsAfterInputHandlingIfNeeded();
                Dominik Inführ . unresolved

                Michael, Omer and I discussed this issue again just now. For NotifyLoadingEnded, we recompute (or alternatively) reset limits here to not finalize incremental marking early. But since introducing this for NotifyLoadedingEnded, we started reseting/recomputing allocation limits on incremental marking start recently to prevent exactly this (IIRC in other scenarios) as well.

                So we think that we don't need to recompute/reset limits here at all anymore. (I will update NotifyLoadingEnded() accordingly in a separate CL). So just this should be enough:

                ```
                // .... code before ....
                if (context == LeaveHeapState::kNotify) {
                if (auto* job = incremental_marking()->incremental_marking_job()) {
                // The task will start incremental marking (if needed not already
                // started) and advance marking if incremental marking is active.
                job->ScheduleTask();
                }
                } else {
                DCHECK_EQ(context, LeaveHeapState::kReachedTimeout);
                // Nothing to do here because we only trigger this from a GC.
                }
                ```

                I hope this is somewhat clear. This should also solve our concern that back-to-back input phases could grow the heap without bounds. Wdyt?

                Gerrit-Comment-Date: Wed, 07 Jan 2026 14:41:49 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                unsatisfied_requirement
                satisfied_requirement
                open
                diffy

                Thiabaud Engelbrecht (Gerrit)

                unread,
                Jan 7, 2026, 2:24:42 PM (2 days ago) Jan 7
                to Michael Lippautz, Etienne Pierre-Doray, Omer Katz, Dominik Inführ, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                Attention needed from Dominik Inführ, Etienne Pierre-Doray and Omer Katz

                Thiabaud Engelbrecht added 1 comment

                File src/heap/heap.cc
                Line 7934, Patchset 17: RecomputeLimitsAfterInputHandlingIfNeeded();
                Dominik Inführ . unresolved

                Michael, Omer and I discussed this issue again just now. For NotifyLoadingEnded, we recompute (or alternatively) reset limits here to not finalize incremental marking early. But since introducing this for NotifyLoadedingEnded, we started reseting/recomputing allocation limits on incremental marking start recently to prevent exactly this (IIRC in other scenarios) as well.

                So we think that we don't need to recompute/reset limits here at all anymore. (I will update NotifyLoadingEnded() accordingly in a separate CL). So just this should be enough:

                ```
                // .... code before ....
                if (context == LeaveHeapState::kNotify) {
                if (auto* job = incremental_marking()->incremental_marking_job()) {
                // The task will start incremental marking (if needed not already
                // started) and advance marking if incremental marking is active.
                job->ScheduleTask();
                }
                } else {
                DCHECK_EQ(context, LeaveHeapState::kReachedTimeout);
                // Nothing to do here because we only trigger this from a GC.
                }
                ```

                I hope this is somewhat clear. This should also solve our concern that back-to-back input phases could grow the heap without bounds. Wdyt?

                Thiabaud Engelbrecht

                Done (leaving thread open if Michael wants to comment).

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Dominik Inführ
                • Etienne Pierre-Doray
                • Omer Katz
                Submit Requirements:
                  • requirement is not satisfiedCode-Owners
                  • requirement is not satisfiedCode-Review
                  • requirement is not satisfiedNo-Unresolved-Comments
                  • requirement is not satisfiedReview-Enforcement
                  Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                  Gerrit-MessageType: comment
                  Gerrit-Project: v8/v8
                  Gerrit-Branch: main
                  Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                  Gerrit-Change-Number: 7201825
                  Gerrit-PatchSet: 19
                  Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                  Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                  Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                  Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                  Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                  Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                  Gerrit-CC: Benoit Lize <li...@chromium.org>
                  Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                  Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                  Gerrit-Attention: Omer Katz <omer...@chromium.org>
                  Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
                  Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
                  Gerrit-Comment-Date: Wed, 07 Jan 2026 19:24:39 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Dominik Inführ <dinf...@chromium.org>
                  unsatisfied_requirement
                  open
                  diffy

                  Omer Katz (Gerrit)

                  unread,
                  Jan 7, 2026, 3:25:15 PM (2 days ago) Jan 7
                  to Thiabaud Engelbrecht, Michael Lippautz, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                  Attention needed from Dominik Inführ, Etienne Pierre-Doray and Thiabaud Engelbrecht

                  Omer Katz voted and added 3 comments

                  Votes added by Omer Katz

                  Code-Review+1

                  3 comments

                  Patchset-level comments
                  File-level comment, Patchset 19 (Latest):
                  Omer Katz . resolved

                  lgtm % comments

                  File src/flags/flag-definitions.h
                  Line 2603, Patchset 19 (Latest):DEFINE_INT(fixed_margin_for_input_handling, 0,
                  Omer Katz . unresolved

                  Can we give this a real value?
                  I assume you won't run input mode with a fixed margin of 0.

                  File src/heap/heap.cc
                  Line 5708, Patchset 19 (Latest): // TODO(crbug.com/444705203): Entering and leaving input mode repeatedly may
                  Omer Katz . unresolved

                  I believe this is no longer an issue now that leaving input mode doesn't update the limits.

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Dominik Inführ
                  • Etienne Pierre-Doray
                  • Thiabaud Engelbrecht
                  Submit Requirements:
                    • requirement is not satisfiedCode-Owners
                    • requirement is not satisfiedCode-Review
                    • requirement is not satisfiedNo-Unresolved-Comments
                    • requirement satisfiedReview-Enforcement
                    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                    Gerrit-MessageType: comment
                    Gerrit-Project: v8/v8
                    Gerrit-Branch: main
                    Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                    Gerrit-Change-Number: 7201825
                    Gerrit-PatchSet: 19
                    Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                    Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                    Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                    Gerrit-CC: Benoit Lize <li...@chromium.org>
                    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                    Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
                    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
                    Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
                    Gerrit-Comment-Date: Wed, 07 Jan 2026 20:25:09 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: Yes
                    unsatisfied_requirement
                    satisfied_requirement
                    open
                    diffy

                    Thiabaud Engelbrecht (Gerrit)

                    unread,
                    Jan 7, 2026, 3:38:22 PM (2 days ago) Jan 7
                    to Omer Katz, Michael Lippautz, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                    Attention needed from Dominik Inführ, Etienne Pierre-Doray and Omer Katz

                    Thiabaud Engelbrecht added 3 comments

                    Patchset-level comments
                    Omer Katz . resolved

                    lgtm % comments

                    Thiabaud Engelbrecht

                    Thanks!

                    File src/flags/flag-definitions.h
                    Line 2603, Patchset 19:DEFINE_INT(fixed_margin_for_input_handling, 0,
                    Omer Katz . resolved

                    Can we give this a real value?
                    I assume you won't run input mode with a fixed margin of 0.

                    Thiabaud Engelbrecht

                    Done

                    File src/heap/heap.cc
                    Line 5708, Patchset 19: // TODO(crbug.com/444705203): Entering and leaving input mode repeatedly may
                    Omer Katz . resolved

                    I believe this is no longer an issue now that leaving input mode doesn't update the limits.

                    Thiabaud Engelbrecht

                    Done

                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • Dominik Inführ
                    • Etienne Pierre-Doray
                    • Omer Katz
                    Submit Requirements:
                      • requirement is not satisfiedCode-Owners
                      • requirement is not satisfiedCode-Review
                      • requirement is not satisfiedNo-Unresolved-Comments
                      • requirement is not satisfiedReview-Enforcement
                      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                      Gerrit-MessageType: comment
                      Gerrit-Project: v8/v8
                      Gerrit-Branch: main
                      Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                      Gerrit-Change-Number: 7201825
                      Gerrit-PatchSet: 20
                      Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                      Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                      Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                      Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                      Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                      Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                      Gerrit-CC: Benoit Lize <li...@chromium.org>
                      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                      Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                      Gerrit-Attention: Omer Katz <omer...@chromium.org>
                      Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
                      Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
                      Gerrit-Comment-Date: Wed, 07 Jan 2026 20:38:18 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: No
                      Comment-In-Reply-To: Omer Katz <omer...@chromium.org>
                      unsatisfied_requirement
                      open
                      diffy

                      Omer Katz (Gerrit)

                      unread,
                      Jan 8, 2026, 4:19:18 AM (yesterday) Jan 8
                      to Thiabaud Engelbrecht, Michael Lippautz, Etienne Pierre-Doray, Dominik Inführ, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                      Attention needed from Dominik Inführ, Etienne Pierre-Doray and Thiabaud Engelbrecht

                      Omer Katz voted Code-Review+1

                      Code-Review+1
                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Dominik Inführ
                      • Etienne Pierre-Doray
                      • Thiabaud Engelbrecht
                      Submit Requirements:
                        • requirement is not satisfiedCode-Owners
                        • requirement is not satisfiedCode-Review
                        • requirement is not satisfiedNo-Unresolved-Comments
                        • requirement satisfiedReview-Enforcement
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: v8/v8
                        Gerrit-Branch: main
                        Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                        Gerrit-Change-Number: 7201825
                        Gerrit-PatchSet: 20
                        Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                        Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                        Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                        Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                        Gerrit-CC: Benoit Lize <li...@chromium.org>
                        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                        Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
                        Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
                        Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
                        Gerrit-Comment-Date: Thu, 08 Jan 2026 09:19:13 +0000
                        Gerrit-HasComments: No
                        Gerrit-Has-Labels: Yes
                        unsatisfied_requirement
                        satisfied_requirement
                        open
                        diffy

                        Dominik Inführ (Gerrit)

                        unread,
                        Jan 8, 2026, 9:01:54 AM (21 hours ago) Jan 8
                        to Thiabaud Engelbrecht, Omer Katz, Michael Lippautz, Etienne Pierre-Doray, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                        Attention needed from Etienne Pierre-Doray and Thiabaud Engelbrecht

                        Dominik Inführ voted and added 2 comments

                        Votes added by Dominik Inführ

                        Code-Review+1

                        2 comments

                        Patchset-level comments
                        File-level comment, Patchset 20 (Latest):
                        Dominik Inführ . resolved

                        Thanks a lot for the patience! LGTM modulo the comment Michael raised.

                        File include/v8-isolate.h
                        Line 1557, Patchset 17: * which simply updates the timestamp when V8 considers the input handling
                        Michael Lippautz . unresolved

                        Doesn't this mean that repeatedly calling `SetIsInputHandling(true)` allows for bypassing the max time for a single input handler?

                        Thiabaud Engelbrecht

                        Yes, would you prefer for this to be a no-op?

                        Michael Lippautz

                        Yes : )

                        Dominik Inführ

                        +1 to this one.

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Etienne Pierre-Doray
                        • Thiabaud Engelbrecht
                        Submit Requirements:
                          • requirement is not satisfiedCode-Owners
                          • requirement satisfiedCode-Review
                          • requirement is not satisfiedNo-Unresolved-Comments
                          • requirement satisfiedReview-Enforcement
                          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                          Gerrit-MessageType: comment
                          Gerrit-Project: v8/v8
                          Gerrit-Branch: main
                          Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                          Gerrit-Change-Number: 7201825
                          Gerrit-PatchSet: 20
                          Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                          Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                          Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                          Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                          Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                          Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                          Gerrit-CC: Benoit Lize <li...@chromium.org>
                          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                          Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                          Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
                          Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
                          Gerrit-Comment-Date: Thu, 08 Jan 2026 14:01:49 +0000
                          Gerrit-HasComments: Yes
                          Gerrit-Has-Labels: Yes
                          unsatisfied_requirement
                          satisfied_requirement
                          open
                          diffy

                          Michael Lippautz (Gerrit)

                          unread,
                          Jan 8, 2026, 9:39:31 AM (21 hours ago) Jan 8
                          to Thiabaud Engelbrecht, Dominik Inführ, Omer Katz, Etienne Pierre-Doray, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                          Attention needed from Etienne Pierre-Doray and Thiabaud Engelbrecht

                          Michael Lippautz added 3 comments

                          File include/v8-isolate.h
                          Line 1557, Patchset 17: * which simply updates the timestamp when V8 considers the input handling
                          Michael Lippautz . unresolved

                          Doesn't this mean that repeatedly calling `SetIsInputHandling(true)` allows for bypassing the max time for a single input handler?

                          Thiabaud Engelbrecht

                          Yes, would you prefer for this to be a no-op?

                          Michael Lippautz

                          Yes : )

                          Dominik Inführ

                          +1 to this one.

                          Michael Lippautz

                          This is still open, no?

                          File src/flags/flag-definitions.h
                          Line 2606, Patchset 20 (Latest):DEFINE_BOOL(optimize_for_input_handling, false,
                          Michael Lippautz . unresolved

                          Please add this to http://go/v8-garbage-collection-experiments once you add an experiment.

                          File src/heap/heap.cc
                          Line 7934, Patchset 17: RecomputeLimitsAfterInputHandlingIfNeeded();
                          Dominik Inführ . resolved

                          Michael, Omer and I discussed this issue again just now. For NotifyLoadingEnded, we recompute (or alternatively) reset limits here to not finalize incremental marking early. But since introducing this for NotifyLoadedingEnded, we started reseting/recomputing allocation limits on incremental marking start recently to prevent exactly this (IIRC in other scenarios) as well.

                          So we think that we don't need to recompute/reset limits here at all anymore. (I will update NotifyLoadingEnded() accordingly in a separate CL). So just this should be enough:

                          ```
                          // .... code before ....
                          if (context == LeaveHeapState::kNotify) {
                          if (auto* job = incremental_marking()->incremental_marking_job()) {
                          // The task will start incremental marking (if needed not already
                          // started) and advance marking if incremental marking is active.
                          job->ScheduleTask();
                          }
                          } else {
                          DCHECK_EQ(context, LeaveHeapState::kReachedTimeout);
                          // Nothing to do here because we only trigger this from a GC.
                          }
                          ```

                          I hope this is somewhat clear. This should also solve our concern that back-to-back input phases could grow the heap without bounds. Wdyt?

                          Thiabaud Engelbrecht

                          Done (leaving thread open if Michael wants to comment).

                          Michael Lippautz

                          I think this is done.

                          Gerrit-Comment-Date: Thu, 08 Jan 2026 14:39:26 +0000
                          Gerrit-HasComments: Yes
                          Gerrit-Has-Labels: No
                          Comment-In-Reply-To: Thiabaud Engelbrecht <thia...@google.com>
                          Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
                          Comment-In-Reply-To: Dominik Inführ <dinf...@chromium.org>
                          unsatisfied_requirement
                          satisfied_requirement
                          open
                          diffy

                          Thiabaud Engelbrecht (Gerrit)

                          unread,
                          Jan 8, 2026, 11:07:06 AM (19 hours ago) Jan 8
                          to Dominik Inführ, Omer Katz, Michael Lippautz, Etienne Pierre-Doray, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                          Attention needed from Dominik Inführ, Etienne Pierre-Doray, Michael Lippautz and Omer Katz

                          Thiabaud Engelbrecht added 2 comments

                          File include/v8-isolate.h
                          Line 1557, Patchset 17: * which simply updates the timestamp when V8 considers the input handling
                          Michael Lippautz . resolved

                          Doesn't this mean that repeatedly calling `SetIsInputHandling(true)` allows for bypassing the max time for a single input handler?

                          Thiabaud Engelbrecht

                          Yes, would you prefer for this to be a no-op?

                          Michael Lippautz

                          Yes : )

                          Dominik Inführ

                          +1 to this one.

                          Michael Lippautz

                          This is still open, no?

                          Thiabaud Engelbrecht

                          Done

                          File src/flags/flag-definitions.h
                          Line 2606, Patchset 20:DEFINE_BOOL(optimize_for_input_handling, false,
                          Michael Lippautz . resolved

                          Please add this to http://go/v8-garbage-collection-experiments once you add an experiment.

                          Thiabaud Engelbrecht

                          Acknowledged

                          Open in Gerrit

                          Related details

                          Attention is currently required from:
                          • Dominik Inführ
                          • Etienne Pierre-Doray
                          • Michael Lippautz
                          • Omer Katz
                          Submit Requirements:
                            • requirement is not satisfiedCode-Owners
                            • requirement is not satisfiedCode-Review
                            • requirement is not satisfiedNo-Unresolved-Comments
                            • requirement is not satisfiedReview-Enforcement
                            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                            Gerrit-MessageType: comment
                            Gerrit-Project: v8/v8
                            Gerrit-Branch: main
                            Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                            Gerrit-Change-Number: 7201825
                            Gerrit-PatchSet: 21
                            Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                            Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                            Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                            Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                            Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                            Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                            Gerrit-CC: Benoit Lize <li...@chromium.org>
                            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                            Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                            Gerrit-Attention: Omer Katz <omer...@chromium.org>
                            Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
                            Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
                            Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
                            Gerrit-Comment-Date: Thu, 08 Jan 2026 16:07:02 +0000
                            unsatisfied_requirement
                            open
                            diffy

                            Michael Lippautz (Gerrit)

                            unread,
                            Jan 8, 2026, 1:00:28 PM (17 hours ago) Jan 8
                            to Thiabaud Engelbrecht, Dominik Inführ, Omer Katz, Etienne Pierre-Doray, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                            Attention needed from Dominik Inführ, Etienne Pierre-Doray, Omer Katz and Thiabaud Engelbrecht

                            Michael Lippautz voted and added 1 comment

                            Votes added by Michael Lippautz

                            Code-Review+1

                            1 comment

                            Patchset-level comments
                            File-level comment, Patchset 21 (Latest):
                            Michael Lippautz . resolved

                            lgtm, thanks for the patience!

                            Open in Gerrit

                            Related details

                            Attention is currently required from:
                            • Dominik Inführ
                            • Etienne Pierre-Doray
                            • Omer Katz
                            • Thiabaud Engelbrecht
                            Submit Requirements:
                            • requirement satisfiedCode-Owners
                            • requirement is not satisfiedCode-Review
                            • requirement is not satisfiedNo-Unresolved-Comments
                            • requirement satisfiedReview-Enforcement
                            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                            Gerrit-MessageType: comment
                            Gerrit-Project: v8/v8
                            Gerrit-Branch: main
                            Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                            Gerrit-Change-Number: 7201825
                            Gerrit-PatchSet: 21
                            Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                            Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                            Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                            Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                            Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                            Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                            Gerrit-CC: Benoit Lize <li...@chromium.org>
                            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                            Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                            Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
                            Gerrit-Attention: Omer Katz <omer...@chromium.org>
                            Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
                            Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
                            Gerrit-Comment-Date: Thu, 08 Jan 2026 18:00:22 +0000
                            Gerrit-HasComments: Yes
                            Gerrit-Has-Labels: Yes
                            satisfied_requirement
                            unsatisfied_requirement
                            open
                            diffy

                            Thiabaud Engelbrecht (Gerrit)

                            unread,
                            Jan 8, 2026, 1:11:45 PM (17 hours ago) Jan 8
                            to Michael Lippautz, Dominik Inführ, Omer Katz, Etienne Pierre-Doray, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                            Attention needed from Dominik Inführ, Etienne Pierre-Doray and Omer Katz

                            Thiabaud Engelbrecht voted Auto-Submit+1

                            Auto-Submit+1
                            Open in Gerrit

                            Related details

                            Attention is currently required from:
                            • Dominik Inführ
                            • Etienne Pierre-Doray
                            • Omer Katz
                            Submit Requirements:
                            • requirement satisfiedCode-Owners
                            • requirement is not satisfiedCode-Review
                            • requirement is not satisfiedNo-Unresolved-Comments
                            • requirement satisfiedReview-Enforcement
                            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                            Gerrit-MessageType: comment
                            Gerrit-Project: v8/v8
                            Gerrit-Branch: main
                            Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                            Gerrit-Change-Number: 7201825
                            Gerrit-PatchSet: 21
                            Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                            Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                            Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                            Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                            Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                            Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                            Gerrit-CC: Benoit Lize <li...@chromium.org>
                            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                            Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                            Gerrit-Attention: Omer Katz <omer...@chromium.org>
                            Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
                            Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
                            Gerrit-Comment-Date: Thu, 08 Jan 2026 18:11:39 +0000
                            Gerrit-HasComments: No
                            Gerrit-Has-Labels: Yes
                            satisfied_requirement
                            unsatisfied_requirement
                            open
                            diffy

                            Etienne Pierre-Doray (Gerrit)

                            unread,
                            Jan 8, 2026, 2:13:13 PM (16 hours ago) Jan 8
                            to Thiabaud Engelbrecht, Michael Lippautz, Dominik Inführ, Omer Katz, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                            Attention needed from Dominik Inführ, Omer Katz and Thiabaud Engelbrecht

                            Etienne Pierre-Doray voted

                            Code-Review+1
                            Commit-Queue+2
                            Open in Gerrit

                            Related details

                            Attention is currently required from:
                            • Dominik Inführ
                            • Omer Katz
                            • Thiabaud Engelbrecht
                            Submit Requirements:
                            • requirement satisfiedCode-Owners
                            • requirement satisfiedCode-Review
                            • requirement is not satisfiedNo-Unresolved-Comments
                            • requirement satisfiedReview-Enforcement
                            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                            Gerrit-MessageType: comment
                            Gerrit-Project: v8/v8
                            Gerrit-Branch: main
                            Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                            Gerrit-Change-Number: 7201825
                            Gerrit-PatchSet: 21
                            Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                            Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                            Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                            Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                            Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                            Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                            Gerrit-CC: Benoit Lize <li...@chromium.org>
                            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                            Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                            Gerrit-Attention: Thiabaud Engelbrecht <thia...@google.com>
                            Gerrit-Attention: Omer Katz <omer...@chromium.org>
                            Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
                            Gerrit-Comment-Date: Thu, 08 Jan 2026 19:13:08 +0000
                            Gerrit-HasComments: No
                            Gerrit-Has-Labels: Yes
                            satisfied_requirement
                            unsatisfied_requirement
                            open
                            diffy

                            Thiabaud Engelbrecht (Gerrit)

                            unread,
                            Jan 8, 2026, 2:51:38 PM (15 hours ago) Jan 8
                            to Etienne Pierre-Doray, Michael Lippautz, Dominik Inführ, Omer Katz, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                            Attention needed from Benoit Lize, Dominik Inführ, Etienne Pierre-Doray and Omer Katz

                            Thiabaud Engelbrecht added 1 comment

                            Patchset-level comments
                            File-level comment, Patchset 4:
                            Benoit Lize . resolved

                            High level comments:
                            Right now the implementation of loading and input are shared, but this is likely not what we want: one if for throughput, the other one for responsiveness.

                            For instance, we may not want to change GC limits for input, just to temporarily waive the limit (up to a point), whereas the reset logic for limit for loading would be different (since we expect the live heap to grow, and a lot of garbage to be generated).

                            Also we need to handle stacking of the two hints.

                            So I would suggest:

                            • Inline the conditions like "IsLoading() and IsInputHandling()" in the calling code
                            • Make sure that they stack correctly

                            Also, is it possible to add tests? In particular, can you test the stacking? So something like input while loading, and weird overlaps like that.

                            Michael Lippautz

                            I requested a design doc for this particular project that asked for:
                            1. splitting of the signal (which is done)
                            2. finding memory limits that are reasonable for for delaying GC (as loading is effectively disabling it for most parts) (wip)
                            3. Figuring out returning after the "scope" was left. Stacking is triggering similar cases. (wip)

                            I think the CL is going in the right direction but given your comments/questions here Benoit (and the fact that I want to see very similar things), I wonder if we shouldn't pause it until these questions are answered on a design doc.

                            Thiabaud Engelbrecht

                            Done

                            Open in Gerrit

                            Related details

                            Attention is currently required from:
                            • Benoit Lize
                            • Dominik Inführ
                            • Etienne Pierre-Doray
                            • Omer Katz
                              Submit Requirements:
                                • requirement satisfiedCode-Owners
                                • requirement satisfiedCode-Review
                                • requirement satisfiedReview-Enforcement
                                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                                Gerrit-MessageType: comment
                                Gerrit-Project: v8/v8
                                Gerrit-Branch: main
                                Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                                Gerrit-Change-Number: 7201825
                                Gerrit-PatchSet: 21
                                Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                                Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                                Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                                Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                                Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                                Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                                Gerrit-CC: Benoit Lize <li...@chromium.org>
                                Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                                Gerrit-CC: Hannes Payer <hpa...@chromium.org>
                                Gerrit-Attention: Benoit Lize <li...@chromium.org>
                                Gerrit-Attention: Omer Katz <omer...@chromium.org>
                                Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
                                Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
                                Gerrit-Comment-Date: Thu, 08 Jan 2026 19:51:33 +0000
                                Gerrit-HasComments: Yes
                                Gerrit-Has-Labels: No
                                Comment-In-Reply-To: Benoit Lize <li...@chromium.org>
                                Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
                                satisfied_requirement
                                open
                                diffy

                                Thiabaud Engelbrecht (Gerrit)

                                unread,
                                Jan 8, 2026, 2:51:50 PM (15 hours ago) Jan 8
                                to Etienne Pierre-Doray, Michael Lippautz, Dominik Inführ, Omer Katz, AyeAye, Code Review Nudger, Benoit Lize, V8 LUCI CQ, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
                                Attention needed from Benoit Lize, Dominik Inführ, Etienne Pierre-Doray and Omer Katz

                                Thiabaud Engelbrecht voted Commit-Queue+2

                                Commit-Queue+2
                                Gerrit-Comment-Date: Thu, 08 Jan 2026 19:51:47 +0000
                                Gerrit-HasComments: No
                                Gerrit-Has-Labels: Yes
                                satisfied_requirement
                                open
                                diffy

                                V8 LUCI CQ (Gerrit)

                                unread,
                                Jan 8, 2026, 2:53:33 PM (15 hours ago) Jan 8
                                to Thiabaud Engelbrecht, Etienne Pierre-Doray, Michael Lippautz, Dominik Inführ, Omer Katz, AyeAye, Code Review Nudger, Benoit Lize, Hannes Payer, v8-flag...@chromium.org, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com

                                V8 LUCI CQ submitted the change

                                Change information

                                Commit message:
                                [heap] Add input hint

                                This CL adds an API to allow the embedder to tell V8 that it is
                                currently handling input. This allows V8 to potentially avoid doing
                                GCs during this window, in order to avoid jank of the input
                                handling.
                                Bug: 444705203
                                Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                                Reviewed-by: Etienne Pierre-Doray <etie...@chromium.org>
                                Reviewed-by: Michael Lippautz <mlip...@chromium.org>
                                Auto-Submit: Thiabaud Engelbrecht <thia...@google.com>
                                Commit-Queue: Thiabaud Engelbrecht <thia...@google.com>
                                Cr-Commit-Position: refs/heads/main@{#104571}
                                Files:
                                • M include/v8-isolate.h
                                • M src/api/api.cc
                                • M src/execution/isolate.cc
                                • M src/execution/isolate.h
                                • M src/flags/flag-definitions.h
                                • M src/heap/heap.cc
                                • M src/heap/heap.h
                                Change size: M
                                Delta: 7 files changed, 198 insertions(+), 27 deletions(-)
                                Branch: refs/heads/main
                                Submit Requirements:
                                • requirement satisfiedCode-Review: +1 by Etienne Pierre-Doray, +1 by Michael Lippautz
                                Open in Gerrit
                                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                                Gerrit-MessageType: merged
                                Gerrit-Project: v8/v8
                                Gerrit-Branch: main
                                Gerrit-Change-Id: I0f061e35fe795c392e3b23c6df154762a1cd85bd
                                Gerrit-Change-Number: 7201825
                                Gerrit-PatchSet: 22
                                Gerrit-Owner: Thiabaud Engelbrecht <thia...@google.com>
                                Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
                                Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
                                Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
                                Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
                                Gerrit-Reviewer: Thiabaud Engelbrecht <thia...@google.com>
                                open
                                diffy
                                satisfied_requirement
                                Reply all
                                Reply to author
                                Forward
                                0 new messages